// Autogenerated by Thrift Compiler (0.13.0)
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING

package secondaryqrcodeloginservice

import(
	"bytes"
	"context"
	"reflect"
	"database/sql/driver"
	"errors"
	"fmt"
	"github.com/bashery/botline/thriftjos"
)

// (needed to ensure safety because of naive import list construction.)
var _ = thrift.ZERO
var _ = fmt.Printf
var _ = context.Background
var _ = reflect.DeepEqual
var _ = bytes.Equal

type ErrorCode int64
const (
  ErrorCode_INTERNAL_ERROR ErrorCode = 0
  ErrorCode_ILLEGAL_ARGUMENT ErrorCode = 1
  ErrorCode_VERIFICATION_FAILED ErrorCode = 2
  ErrorCode_NOT_ALLOWED_QR_CODE_LOGIN ErrorCode = 3
  ErrorCode_VERIFICATION_NOTICE_FAILED ErrorCode = 4
  ErrorCode_RETRY_LATER ErrorCode = 5
  ErrorCode_INVALID_CONTEXT ErrorCode = 100
  ErrorCode_APP_UPGRADE_REQUIRED ErrorCode = 101
)

func (p ErrorCode) String() string {
  switch p {
  case ErrorCode_INTERNAL_ERROR: return "INTERNAL_ERROR"
  case ErrorCode_ILLEGAL_ARGUMENT: return "ILLEGAL_ARGUMENT"
  case ErrorCode_VERIFICATION_FAILED: return "VERIFICATION_FAILED"
  case ErrorCode_NOT_ALLOWED_QR_CODE_LOGIN: return "NOT_ALLOWED_QR_CODE_LOGIN"
  case ErrorCode_VERIFICATION_NOTICE_FAILED: return "VERIFICATION_NOTICE_FAILED"
  case ErrorCode_RETRY_LATER: return "RETRY_LATER"
  case ErrorCode_INVALID_CONTEXT: return "INVALID_CONTEXT"
  case ErrorCode_APP_UPGRADE_REQUIRED: return "APP_UPGRADE_REQUIRED"
  }
  return "<UNSET>"
}

func ErrorCodeFromString(s string) (ErrorCode, error) {
  switch s {
  case "INTERNAL_ERROR": return ErrorCode_INTERNAL_ERROR, nil 
  case "ILLEGAL_ARGUMENT": return ErrorCode_ILLEGAL_ARGUMENT, nil 
  case "VERIFICATION_FAILED": return ErrorCode_VERIFICATION_FAILED, nil 
  case "NOT_ALLOWED_QR_CODE_LOGIN": return ErrorCode_NOT_ALLOWED_QR_CODE_LOGIN, nil 
  case "VERIFICATION_NOTICE_FAILED": return ErrorCode_VERIFICATION_NOTICE_FAILED, nil 
  case "RETRY_LATER": return ErrorCode_RETRY_LATER, nil 
  case "INVALID_CONTEXT": return ErrorCode_INVALID_CONTEXT, nil 
  case "APP_UPGRADE_REQUIRED": return ErrorCode_APP_UPGRADE_REQUIRED, nil 
  }
  return ErrorCode(0), fmt.Errorf("not a valid ErrorCode string")
}


func ErrorCodePtr(v ErrorCode) *ErrorCode { return &v }

func (p ErrorCode) MarshalText() ([]byte, error) {
return []byte(p.String()), nil
}

func (p *ErrorCode) UnmarshalText(text []byte) error {
q, err := ErrorCodeFromString(string(text))
if (err != nil) {
return err
}
*p = q
return nil
}

func (p *ErrorCode) Scan(value interface{}) error {
v, ok := value.(int64)
if !ok {
return errors.New("Scan value is not int64")
}
*p = ErrorCode(v)
return nil
}

func (p * ErrorCode) Value() (driver.Value, error) {
  if p == nil {
    return nil, nil
  }
return int64(*p), nil
}
// Attributes:
//  - AuthSessionId
type CancelPinCodeRequest struct {
  AuthSessionId string `thrift:"authSessionId,1" db:"authSessionId" json:"authSessionId"`
}

func NewCancelPinCodeRequest() *CancelPinCodeRequest {
  return &CancelPinCodeRequest{}
}


func (p *CancelPinCodeRequest) GetAuthSessionId() string {
  return p.AuthSessionId
}
func (p *CancelPinCodeRequest) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 1:
      if fieldTypeId == thrift.STRING {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *CancelPinCodeRequest)  ReadField1(iprot thrift.TProtocol) error {
  if v, err := iprot.ReadString(); err != nil {
  return thrift.PrependError("error reading field 1: ", err)
} else {
  p.AuthSessionId = v
}
  return nil
}

func (p *CancelPinCodeRequest) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("CancelPinCodeRequest"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *CancelPinCodeRequest) writeField1(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("authSessionId", thrift.STRING, 1); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:authSessionId: ", p), err) }
  if err := oprot.WriteString(string(p.AuthSessionId)); err != nil {
  return thrift.PrependError(fmt.Sprintf("%T.authSessionId (1) field write error: ", p), err) }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 1:authSessionId: ", p), err) }
  return err
}

func (p *CancelPinCodeRequest) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("CancelPinCodeRequest(%+v)", *p)
}

type CancelPinCodeResponse struct {
}

func NewCancelPinCodeResponse() *CancelPinCodeResponse {
  return &CancelPinCodeResponse{}
}

func (p *CancelPinCodeResponse) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    if err := iprot.Skip(fieldTypeId); err != nil {
      return err
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *CancelPinCodeResponse) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("CancelPinCodeResponse"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *CancelPinCodeResponse) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("CancelPinCodeResponse(%+v)", *p)
}

// Attributes:
//  - Code
//  - AlertMessage
type SecondaryQrCodeException struct {
  Code ErrorCode `thrift:"code,1" db:"code" json:"code"`
  AlertMessage string `thrift:"alertMessage,2" db:"alertMessage" json:"alertMessage"`
}

func NewSecondaryQrCodeException() *SecondaryQrCodeException {
  return &SecondaryQrCodeException{}
}


func (p *SecondaryQrCodeException) GetCode() ErrorCode {
  return p.Code
}

func (p *SecondaryQrCodeException) GetAlertMessage() string {
  return p.AlertMessage
}
func (p *SecondaryQrCodeException) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 1:
      if fieldTypeId == thrift.I32 {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    case 2:
      if fieldTypeId == thrift.STRING {
        if err := p.ReadField2(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *SecondaryQrCodeException)  ReadField1(iprot thrift.TProtocol) error {
  if v, err := iprot.ReadI32(); err != nil {
  return thrift.PrependError("error reading field 1: ", err)
} else {
  temp := ErrorCode(v)
  p.Code = temp
}
  return nil
}

func (p *SecondaryQrCodeException)  ReadField2(iprot thrift.TProtocol) error {
  if v, err := iprot.ReadString(); err != nil {
  return thrift.PrependError("error reading field 2: ", err)
} else {
  p.AlertMessage = v
}
  return nil
}

func (p *SecondaryQrCodeException) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("SecondaryQrCodeException"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField1(oprot); err != nil { return err }
    if err := p.writeField2(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *SecondaryQrCodeException) writeField1(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("code", thrift.I32, 1); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) }
  if err := oprot.WriteI32(int32(p.Code)); err != nil {
  return thrift.PrependError(fmt.Sprintf("%T.code (1) field write error: ", p), err) }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) }
  return err
}

func (p *SecondaryQrCodeException) writeField2(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("alertMessage", thrift.STRING, 2); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:alertMessage: ", p), err) }
  if err := oprot.WriteString(string(p.AlertMessage)); err != nil {
  return thrift.PrependError(fmt.Sprintf("%T.alertMessage (2) field write error: ", p), err) }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 2:alertMessage: ", p), err) }
  return err
}

func (p *SecondaryQrCodeException) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("SecondaryQrCodeException(%+v)", *p)
}

func (p *SecondaryQrCodeException) Error() string {
  return p.String()
}

type VerifyQrCodeResponse struct {
}

func NewVerifyQrCodeResponse() *VerifyQrCodeResponse {
  return &VerifyQrCodeResponse{}
}

func (p *VerifyQrCodeResponse) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    if err := iprot.Skip(fieldTypeId); err != nil {
      return err
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *VerifyQrCodeResponse) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("VerifyQrCodeResponse"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *VerifyQrCodeResponse) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("VerifyQrCodeResponse(%+v)", *p)
}

// Attributes:
//  - AuthSessionId
//  - PinCode
type VerifyPinCodeRequest struct {
  AuthSessionId string `thrift:"authSessionId,1" db:"authSessionId" json:"authSessionId"`
  PinCode string `thrift:"pinCode,2" db:"pinCode" json:"pinCode"`
}

func NewVerifyPinCodeRequest() *VerifyPinCodeRequest {
  return &VerifyPinCodeRequest{}
}


func (p *VerifyPinCodeRequest) GetAuthSessionId() string {
  return p.AuthSessionId
}

func (p *VerifyPinCodeRequest) GetPinCode() string {
  return p.PinCode
}
func (p *VerifyPinCodeRequest) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 1:
      if fieldTypeId == thrift.STRING {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    case 2:
      if fieldTypeId == thrift.STRING {
        if err := p.ReadField2(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *VerifyPinCodeRequest)  ReadField1(iprot thrift.TProtocol) error {
  if v, err := iprot.ReadString(); err != nil {
  return thrift.PrependError("error reading field 1: ", err)
} else {
  p.AuthSessionId = v
}
  return nil
}

func (p *VerifyPinCodeRequest)  ReadField2(iprot thrift.TProtocol) error {
  if v, err := iprot.ReadString(); err != nil {
  return thrift.PrependError("error reading field 2: ", err)
} else {
  p.PinCode = v
}
  return nil
}

func (p *VerifyPinCodeRequest) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("VerifyPinCodeRequest"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField1(oprot); err != nil { return err }
    if err := p.writeField2(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *VerifyPinCodeRequest) writeField1(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("authSessionId", thrift.STRING, 1); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:authSessionId: ", p), err) }
  if err := oprot.WriteString(string(p.AuthSessionId)); err != nil {
  return thrift.PrependError(fmt.Sprintf("%T.authSessionId (1) field write error: ", p), err) }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 1:authSessionId: ", p), err) }
  return err
}

func (p *VerifyPinCodeRequest) writeField2(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("pinCode", thrift.STRING, 2); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:pinCode: ", p), err) }
  if err := oprot.WriteString(string(p.PinCode)); err != nil {
  return thrift.PrependError(fmt.Sprintf("%T.pinCode (2) field write error: ", p), err) }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 2:pinCode: ", p), err) }
  return err
}

func (p *VerifyPinCodeRequest) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("VerifyPinCodeRequest(%+v)", *p)
}

type VerifyPinCodeResponse struct {
}

func NewVerifyPinCodeResponse() *VerifyPinCodeResponse {
  return &VerifyPinCodeResponse{}
}

func (p *VerifyPinCodeResponse) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    if err := iprot.Skip(fieldTypeId); err != nil {
      return err
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *VerifyPinCodeResponse) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("VerifyPinCodeResponse"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *VerifyPinCodeResponse) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("VerifyPinCodeResponse(%+v)", *p)
}

// Attributes:
//  - AuthSessionId
//  - Certificate
type VerifyCertificateRequest struct {
  AuthSessionId string `thrift:"authSessionId,1" db:"authSessionId" json:"authSessionId"`
  Certificate string `thrift:"certificate,2" db:"certificate" json:"certificate"`
}

func NewVerifyCertificateRequest() *VerifyCertificateRequest {
  return &VerifyCertificateRequest{}
}


func (p *VerifyCertificateRequest) GetAuthSessionId() string {
  return p.AuthSessionId
}

func (p *VerifyCertificateRequest) GetCertificate() string {
  return p.Certificate
}
func (p *VerifyCertificateRequest) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 1:
      if fieldTypeId == thrift.STRING {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    case 2:
      if fieldTypeId == thrift.STRING {
        if err := p.ReadField2(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *VerifyCertificateRequest)  ReadField1(iprot thrift.TProtocol) error {
  if v, err := iprot.ReadString(); err != nil {
  return thrift.PrependError("error reading field 1: ", err)
} else {
  p.AuthSessionId = v
}
  return nil
}

func (p *VerifyCertificateRequest)  ReadField2(iprot thrift.TProtocol) error {
  if v, err := iprot.ReadString(); err != nil {
  return thrift.PrependError("error reading field 2: ", err)
} else {
  p.Certificate = v
}
  return nil
}

func (p *VerifyCertificateRequest) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("VerifyCertificateRequest"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField1(oprot); err != nil { return err }
    if err := p.writeField2(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *VerifyCertificateRequest) writeField1(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("authSessionId", thrift.STRING, 1); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:authSessionId: ", p), err) }
  if err := oprot.WriteString(string(p.AuthSessionId)); err != nil {
  return thrift.PrependError(fmt.Sprintf("%T.authSessionId (1) field write error: ", p), err) }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 1:authSessionId: ", p), err) }
  return err
}

func (p *VerifyCertificateRequest) writeField2(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("certificate", thrift.STRING, 2); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:certificate: ", p), err) }
  if err := oprot.WriteString(string(p.Certificate)); err != nil {
  return thrift.PrependError(fmt.Sprintf("%T.certificate (2) field write error: ", p), err) }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 2:certificate: ", p), err) }
  return err
}

func (p *VerifyCertificateRequest) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("VerifyCertificateRequest(%+v)", *p)
}

// Attributes:
//  - PinCode
type CreatePinCodeResponse struct {
  PinCode string `thrift:"pinCode,1" db:"pinCode" json:"pinCode"`
}

func NewCreatePinCodeResponse() *CreatePinCodeResponse {
  return &CreatePinCodeResponse{}
}


func (p *CreatePinCodeResponse) GetPinCode() string {
  return p.PinCode
}
func (p *CreatePinCodeResponse) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 1:
      if fieldTypeId == thrift.STRING {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *CreatePinCodeResponse)  ReadField1(iprot thrift.TProtocol) error {
  if v, err := iprot.ReadString(); err != nil {
  return thrift.PrependError("error reading field 1: ", err)
} else {
  p.PinCode = v
}
  return nil
}

func (p *CreatePinCodeResponse) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("CreatePinCodeResponse"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *CreatePinCodeResponse) writeField1(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("pinCode", thrift.STRING, 1); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pinCode: ", p), err) }
  if err := oprot.WriteString(string(p.PinCode)); err != nil {
  return thrift.PrependError(fmt.Sprintf("%T.pinCode (1) field write error: ", p), err) }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 1:pinCode: ", p), err) }
  return err
}

func (p *CreatePinCodeResponse) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("CreatePinCodeResponse(%+v)", *p)
}

// Attributes:
//  - AuthSessionId
type CreatePinCodeRequest struct {
  AuthSessionId string `thrift:"authSessionId,1" db:"authSessionId" json:"authSessionId"`
}

func NewCreatePinCodeRequest() *CreatePinCodeRequest {
  return &CreatePinCodeRequest{}
}


func (p *CreatePinCodeRequest) GetAuthSessionId() string {
  return p.AuthSessionId
}
func (p *CreatePinCodeRequest) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 1:
      if fieldTypeId == thrift.STRING {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *CreatePinCodeRequest)  ReadField1(iprot thrift.TProtocol) error {
  if v, err := iprot.ReadString(); err != nil {
  return thrift.PrependError("error reading field 1: ", err)
} else {
  p.AuthSessionId = v
}
  return nil
}

func (p *CreatePinCodeRequest) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("CreatePinCodeRequest"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *CreatePinCodeRequest) writeField1(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("authSessionId", thrift.STRING, 1); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:authSessionId: ", p), err) }
  if err := oprot.WriteString(string(p.AuthSessionId)); err != nil {
  return thrift.PrependError(fmt.Sprintf("%T.authSessionId (1) field write error: ", p), err) }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 1:authSessionId: ", p), err) }
  return err
}

func (p *CreatePinCodeRequest) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("CreatePinCodeRequest(%+v)", *p)
}

// Attributes:
//  - AuthSessionId
type CreateQrCodeRequest struct {
  AuthSessionId string `thrift:"authSessionId,1" db:"authSessionId" json:"authSessionId"`
}

func NewCreateQrCodeRequest() *CreateQrCodeRequest {
  return &CreateQrCodeRequest{}
}


func (p *CreateQrCodeRequest) GetAuthSessionId() string {
  return p.AuthSessionId
}
func (p *CreateQrCodeRequest) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 1:
      if fieldTypeId == thrift.STRING {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *CreateQrCodeRequest)  ReadField1(iprot thrift.TProtocol) error {
  if v, err := iprot.ReadString(); err != nil {
  return thrift.PrependError("error reading field 1: ", err)
} else {
  p.AuthSessionId = v
}
  return nil
}

func (p *CreateQrCodeRequest) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("CreateQrCodeRequest"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *CreateQrCodeRequest) writeField1(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("authSessionId", thrift.STRING, 1); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:authSessionId: ", p), err) }
  if err := oprot.WriteString(string(p.AuthSessionId)); err != nil {
  return thrift.PrependError(fmt.Sprintf("%T.authSessionId (1) field write error: ", p), err) }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 1:authSessionId: ", p), err) }
  return err
}

func (p *CreateQrCodeRequest) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("CreateQrCodeRequest(%+v)", *p)
}

// Attributes:
//  - CallbackUrl
type CreateQrCodeResponse struct {
  CallbackUrl string `thrift:"callbackUrl,1" db:"callbackUrl" json:"callbackUrl"`
}

func NewCreateQrCodeResponse() *CreateQrCodeResponse {
  return &CreateQrCodeResponse{}
}


func (p *CreateQrCodeResponse) GetCallbackUrl() string {
  return p.CallbackUrl
}
func (p *CreateQrCodeResponse) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 1:
      if fieldTypeId == thrift.STRING {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *CreateQrCodeResponse)  ReadField1(iprot thrift.TProtocol) error {
  if v, err := iprot.ReadString(); err != nil {
  return thrift.PrependError("error reading field 1: ", err)
} else {
  p.CallbackUrl = v
}
  return nil
}

func (p *CreateQrCodeResponse) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("CreateQrCodeResponse"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *CreateQrCodeResponse) writeField1(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("callbackUrl", thrift.STRING, 1); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:callbackUrl: ", p), err) }
  if err := oprot.WriteString(string(p.CallbackUrl)); err != nil {
  return thrift.PrependError(fmt.Sprintf("%T.callbackUrl (1) field write error: ", p), err) }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 1:callbackUrl: ", p), err) }
  return err
}

func (p *CreateQrCodeResponse) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("CreateQrCodeResponse(%+v)", *p)
}

type CreateQrSessionRequest struct {
}

func NewCreateQrSessionRequest() *CreateQrSessionRequest {
  return &CreateQrSessionRequest{}
}

func (p *CreateQrSessionRequest) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    if err := iprot.Skip(fieldTypeId); err != nil {
      return err
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *CreateQrSessionRequest) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("CreateQrSessionRequest"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *CreateQrSessionRequest) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("CreateQrSessionRequest(%+v)", *p)
}

// Attributes:
//  - AuthSessionId
type CreateQrSessionResponse struct {
  AuthSessionId string `thrift:"authSessionId,1" db:"authSessionId" json:"authSessionId"`
}

func NewCreateQrSessionResponse() *CreateQrSessionResponse {
  return &CreateQrSessionResponse{}
}


func (p *CreateQrSessionResponse) GetAuthSessionId() string {
  return p.AuthSessionId
}
func (p *CreateQrSessionResponse) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 1:
      if fieldTypeId == thrift.STRING {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *CreateQrSessionResponse)  ReadField1(iprot thrift.TProtocol) error {
  if v, err := iprot.ReadString(); err != nil {
  return thrift.PrependError("error reading field 1: ", err)
} else {
  p.AuthSessionId = v
}
  return nil
}

func (p *CreateQrSessionResponse) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("CreateQrSessionResponse"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *CreateQrSessionResponse) writeField1(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("authSessionId", thrift.STRING, 1); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:authSessionId: ", p), err) }
  if err := oprot.WriteString(string(p.AuthSessionId)); err != nil {
  return thrift.PrependError(fmt.Sprintf("%T.authSessionId (1) field write error: ", p), err) }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 1:authSessionId: ", p), err) }
  return err
}

func (p *CreateQrSessionResponse) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("CreateQrSessionResponse(%+v)", *p)
}

// Attributes:
//  - AuthSessionId
//  - SystemName
//  - AutoLoginIsRequired
type QrCodeLoginRequest struct {
  AuthSessionId string `thrift:"authSessionId,1" db:"authSessionId" json:"authSessionId"`
  SystemName string `thrift:"systemName,2" db:"systemName" json:"systemName"`
  AutoLoginIsRequired bool `thrift:"autoLoginIsRequired,3" db:"autoLoginIsRequired" json:"autoLoginIsRequired"`
}

func NewQrCodeLoginRequest() *QrCodeLoginRequest {
  return &QrCodeLoginRequest{}
}


func (p *QrCodeLoginRequest) GetAuthSessionId() string {
  return p.AuthSessionId
}

func (p *QrCodeLoginRequest) GetSystemName() string {
  return p.SystemName
}

func (p *QrCodeLoginRequest) GetAutoLoginIsRequired() bool {
  return p.AutoLoginIsRequired
}
func (p *QrCodeLoginRequest) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 1:
      if fieldTypeId == thrift.STRING {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    case 2:
      if fieldTypeId == thrift.STRING {
        if err := p.ReadField2(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    case 3:
      if fieldTypeId == thrift.BOOL {
        if err := p.ReadField3(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *QrCodeLoginRequest)  ReadField1(iprot thrift.TProtocol) error {
  if v, err := iprot.ReadString(); err != nil {
  return thrift.PrependError("error reading field 1: ", err)
} else {
  p.AuthSessionId = v
}
  return nil
}

func (p *QrCodeLoginRequest)  ReadField2(iprot thrift.TProtocol) error {
  if v, err := iprot.ReadString(); err != nil {
  return thrift.PrependError("error reading field 2: ", err)
} else {
  p.SystemName = v
}
  return nil
}

func (p *QrCodeLoginRequest)  ReadField3(iprot thrift.TProtocol) error {
  if v, err := iprot.ReadBool(); err != nil {
  return thrift.PrependError("error reading field 3: ", err)
} else {
  p.AutoLoginIsRequired = v
}
  return nil
}

func (p *QrCodeLoginRequest) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("QrCodeLoginRequest"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField1(oprot); err != nil { return err }
    if err := p.writeField2(oprot); err != nil { return err }
    if err := p.writeField3(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *QrCodeLoginRequest) writeField1(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("authSessionId", thrift.STRING, 1); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:authSessionId: ", p), err) }
  if err := oprot.WriteString(string(p.AuthSessionId)); err != nil {
  return thrift.PrependError(fmt.Sprintf("%T.authSessionId (1) field write error: ", p), err) }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 1:authSessionId: ", p), err) }
  return err
}

func (p *QrCodeLoginRequest) writeField2(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("systemName", thrift.STRING, 2); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:systemName: ", p), err) }
  if err := oprot.WriteString(string(p.SystemName)); err != nil {
  return thrift.PrependError(fmt.Sprintf("%T.systemName (2) field write error: ", p), err) }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 2:systemName: ", p), err) }
  return err
}

func (p *QrCodeLoginRequest) writeField3(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("autoLoginIsRequired", thrift.BOOL, 3); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:autoLoginIsRequired: ", p), err) }
  if err := oprot.WriteBool(bool(p.AutoLoginIsRequired)); err != nil {
  return thrift.PrependError(fmt.Sprintf("%T.autoLoginIsRequired (3) field write error: ", p), err) }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 3:autoLoginIsRequired: ", p), err) }
  return err
}

func (p *QrCodeLoginRequest) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("QrCodeLoginRequest(%+v)", *p)
}

// Attributes:
//  - Certificate
//  - AccessToken
//  - LastBindTimestamp
//  - MetaData
type QrCodeLoginResponse struct {
  Certificate string `thrift:"certificate,1" db:"certificate" json:"certificate"`
  AccessToken string `thrift:"accessToken,2" db:"accessToken" json:"accessToken"`
  LastBindTimestamp int64 `thrift:"lastBindTimestamp,3" db:"lastBindTimestamp" json:"lastBindTimestamp"`
  MetaData map[string]string `thrift:"metaData,4" db:"metaData" json:"metaData"`
}

func NewQrCodeLoginResponse() *QrCodeLoginResponse {
  return &QrCodeLoginResponse{}
}


func (p *QrCodeLoginResponse) GetCertificate() string {
  return p.Certificate
}

func (p *QrCodeLoginResponse) GetAccessToken() string {
  return p.AccessToken
}

func (p *QrCodeLoginResponse) GetLastBindTimestamp() int64 {
  return p.LastBindTimestamp
}

func (p *QrCodeLoginResponse) GetMetaData() map[string]string {
  return p.MetaData
}
func (p *QrCodeLoginResponse) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 1:
      if fieldTypeId == thrift.STRING {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    case 2:
      if fieldTypeId == thrift.STRING {
        if err := p.ReadField2(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    case 3:
      if fieldTypeId == thrift.I64 {
        if err := p.ReadField3(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    case 4:
      if fieldTypeId == thrift.MAP {
        if err := p.ReadField4(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *QrCodeLoginResponse)  ReadField1(iprot thrift.TProtocol) error {
  if v, err := iprot.ReadString(); err != nil {
  return thrift.PrependError("error reading field 1: ", err)
} else {
  p.Certificate = v
}
  return nil
}

func (p *QrCodeLoginResponse)  ReadField2(iprot thrift.TProtocol) error {
  if v, err := iprot.ReadString(); err != nil {
  return thrift.PrependError("error reading field 2: ", err)
} else {
  p.AccessToken = v
}
  return nil
}

func (p *QrCodeLoginResponse)  ReadField3(iprot thrift.TProtocol) error {
  if v, err := iprot.ReadI64(); err != nil {
  return thrift.PrependError("error reading field 3: ", err)
} else {
  p.LastBindTimestamp = v
}
  return nil
}

func (p *QrCodeLoginResponse)  ReadField4(iprot thrift.TProtocol) error {
  _, _, size, err := iprot.ReadMapBegin()
  if err != nil {
    return thrift.PrependError("error reading map begin: ", err)
  }
  tMap := make(map[string]string, size)
  p.MetaData =  tMap
  for i := 0; i < size; i ++ {
var _key0 string
    if v, err := iprot.ReadString(); err != nil {
    return thrift.PrependError("error reading field 0: ", err)
} else {
    _key0 = v
}
var _val1 string
    if v, err := iprot.ReadString(); err != nil {
    return thrift.PrependError("error reading field 0: ", err)
} else {
    _val1 = v
}
    p.MetaData[_key0] = _val1
  }
  if err := iprot.ReadMapEnd(); err != nil {
    return thrift.PrependError("error reading map end: ", err)
  }
  return nil
}

func (p *QrCodeLoginResponse) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("QrCodeLoginResponse"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField1(oprot); err != nil { return err }
    if err := p.writeField2(oprot); err != nil { return err }
    if err := p.writeField3(oprot); err != nil { return err }
    if err := p.writeField4(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *QrCodeLoginResponse) writeField1(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("certificate", thrift.STRING, 1); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:certificate: ", p), err) }
  if err := oprot.WriteString(string(p.Certificate)); err != nil {
  return thrift.PrependError(fmt.Sprintf("%T.certificate (1) field write error: ", p), err) }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 1:certificate: ", p), err) }
  return err
}

func (p *QrCodeLoginResponse) writeField2(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("accessToken", thrift.STRING, 2); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:accessToken: ", p), err) }
  if err := oprot.WriteString(string(p.AccessToken)); err != nil {
  return thrift.PrependError(fmt.Sprintf("%T.accessToken (2) field write error: ", p), err) }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 2:accessToken: ", p), err) }
  return err
}

func (p *QrCodeLoginResponse) writeField3(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("lastBindTimestamp", thrift.I64, 3); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:lastBindTimestamp: ", p), err) }
  if err := oprot.WriteI64(int64(p.LastBindTimestamp)); err != nil {
  return thrift.PrependError(fmt.Sprintf("%T.lastBindTimestamp (3) field write error: ", p), err) }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 3:lastBindTimestamp: ", p), err) }
  return err
}

func (p *QrCodeLoginResponse) writeField4(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("metaData", thrift.MAP, 4); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:metaData: ", p), err) }
  if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.MetaData)); err != nil {
    return thrift.PrependError("error writing map begin: ", err)
  }
  for k, v := range p.MetaData {
    if err := oprot.WriteString(string(k)); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
    if err := oprot.WriteString(string(v)); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) }
  }
  if err := oprot.WriteMapEnd(); err != nil {
    return thrift.PrependError("error writing map end: ", err)
  }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 4:metaData: ", p), err) }
  return err
}

func (p *QrCodeLoginResponse) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("QrCodeLoginResponse(%+v)", *p)
}

type VerifyCertificateResponse struct {
}

func NewVerifyCertificateResponse() *VerifyCertificateResponse {
  return &VerifyCertificateResponse{}
}

func (p *VerifyCertificateResponse) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    if err := iprot.Skip(fieldTypeId); err != nil {
      return err
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *VerifyCertificateResponse) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("VerifyCertificateResponse"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *VerifyCertificateResponse) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("VerifyCertificateResponse(%+v)", *p)
}

// Attributes:
//  - AuthSessionId
type CheckPinCodeVerifiedRequest struct {
  AuthSessionId string `thrift:"authSessionId,1" db:"authSessionId" json:"authSessionId"`
}

func NewCheckPinCodeVerifiedRequest() *CheckPinCodeVerifiedRequest {
  return &CheckPinCodeVerifiedRequest{}
}


func (p *CheckPinCodeVerifiedRequest) GetAuthSessionId() string {
  return p.AuthSessionId
}
func (p *CheckPinCodeVerifiedRequest) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 1:
      if fieldTypeId == thrift.STRING {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *CheckPinCodeVerifiedRequest)  ReadField1(iprot thrift.TProtocol) error {
  if v, err := iprot.ReadString(); err != nil {
  return thrift.PrependError("error reading field 1: ", err)
} else {
  p.AuthSessionId = v
}
  return nil
}

func (p *CheckPinCodeVerifiedRequest) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("CheckPinCodeVerifiedRequest"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *CheckPinCodeVerifiedRequest) writeField1(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("authSessionId", thrift.STRING, 1); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:authSessionId: ", p), err) }
  if err := oprot.WriteString(string(p.AuthSessionId)); err != nil {
  return thrift.PrependError(fmt.Sprintf("%T.authSessionId (1) field write error: ", p), err) }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 1:authSessionId: ", p), err) }
  return err
}

func (p *CheckPinCodeVerifiedRequest) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("CheckPinCodeVerifiedRequest(%+v)", *p)
}

type CheckPinCodeVerifiedResponse struct {
}

func NewCheckPinCodeVerifiedResponse() *CheckPinCodeVerifiedResponse {
  return &CheckPinCodeVerifiedResponse{}
}

func (p *CheckPinCodeVerifiedResponse) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    if err := iprot.Skip(fieldTypeId); err != nil {
      return err
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *CheckPinCodeVerifiedResponse) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("CheckPinCodeVerifiedResponse"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *CheckPinCodeVerifiedResponse) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("CheckPinCodeVerifiedResponse(%+v)", *p)
}

// Attributes:
//  - AuthSessionId
type CheckQrCodeVerifiedRequest struct {
  AuthSessionId string `thrift:"authSessionId,1" db:"authSessionId" json:"authSessionId"`
}

func NewCheckQrCodeVerifiedRequest() *CheckQrCodeVerifiedRequest {
  return &CheckQrCodeVerifiedRequest{}
}


func (p *CheckQrCodeVerifiedRequest) GetAuthSessionId() string {
  return p.AuthSessionId
}
func (p *CheckQrCodeVerifiedRequest) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 1:
      if fieldTypeId == thrift.STRING {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *CheckQrCodeVerifiedRequest)  ReadField1(iprot thrift.TProtocol) error {
  if v, err := iprot.ReadString(); err != nil {
  return thrift.PrependError("error reading field 1: ", err)
} else {
  p.AuthSessionId = v
}
  return nil
}

func (p *CheckQrCodeVerifiedRequest) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("CheckQrCodeVerifiedRequest"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *CheckQrCodeVerifiedRequest) writeField1(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("authSessionId", thrift.STRING, 1); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:authSessionId: ", p), err) }
  if err := oprot.WriteString(string(p.AuthSessionId)); err != nil {
  return thrift.PrependError(fmt.Sprintf("%T.authSessionId (1) field write error: ", p), err) }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 1:authSessionId: ", p), err) }
  return err
}

func (p *CheckQrCodeVerifiedRequest) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("CheckQrCodeVerifiedRequest(%+v)", *p)
}

type CheckQrCodeVerifiedResponse struct {
}

func NewCheckQrCodeVerifiedResponse() *CheckQrCodeVerifiedResponse {
  return &CheckQrCodeVerifiedResponse{}
}

func (p *CheckQrCodeVerifiedResponse) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    if err := iprot.Skip(fieldTypeId); err != nil {
      return err
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *CheckQrCodeVerifiedResponse) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("CheckQrCodeVerifiedResponse"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *CheckQrCodeVerifiedResponse) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("CheckQrCodeVerifiedResponse(%+v)", *p)
}

type SecondaryQRCodeLoginService interface {
  // Parameters:
  //  - Request
  CancelPinCode(ctx context.Context, request *CancelPinCodeRequest) (r *CancelPinCodeResponse, err error)
  // Parameters:
  //  - Request
  VerifyPinCode(ctx context.Context, request *VerifyPinCodeRequest) (r *VerifyPinCodeResponse, err error)
  // Parameters:
  //  - Request
  VerifyQrCode(ctx context.Context, request *VerifyCertificateRequest) (r *VerifyQrCodeResponse, err error)
  // Parameters:
  //  - Request
  CreatePinCode(ctx context.Context, request *CreatePinCodeRequest) (r *CreatePinCodeResponse, err error)
  // Parameters:
  //  - Request
  CreateQrCode(ctx context.Context, request *CreateQrCodeRequest) (r *CreateQrCodeResponse, err error)
  // Parameters:
  //  - Request
  CreateSession(ctx context.Context, request *CreateQrSessionRequest) (r *CreateQrSessionResponse, err error)
  // Parameters:
  //  - Request
  QrCodeLogin(ctx context.Context, request *QrCodeLoginRequest) (r *QrCodeLoginResponse, err error)
  // Parameters:
  //  - Request
  VerifyCertificate(ctx context.Context, request *VerifyCertificateRequest) (r *VerifyCertificateResponse, err error)
  // Parameters:
  //  - Request
  CheckPinCodeVerified(ctx context.Context, request *CheckPinCodeVerifiedRequest) (r *CheckPinCodeVerifiedResponse, err error)
  // Parameters:
  //  - Request
  CheckQrCodeVerified(ctx context.Context, request *CheckQrCodeVerifiedRequest) (r *CheckQrCodeVerifiedResponse, err error)
}

type SecondaryQRCodeLoginServiceClient struct {
  c thrift.TClient
}

func NewSecondaryQRCodeLoginServiceClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *SecondaryQRCodeLoginServiceClient {
  return &SecondaryQRCodeLoginServiceClient{
    c: thrift.NewTStandardClient(f.GetProtocol(t), f.GetProtocol(t)),
  }
}

func NewSecondaryQRCodeLoginServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *SecondaryQRCodeLoginServiceClient {
  return &SecondaryQRCodeLoginServiceClient{
    c: thrift.NewTStandardClient(iprot, oprot),
  }
}

func NewSecondaryQRCodeLoginServiceClient(c thrift.TClient) *SecondaryQRCodeLoginServiceClient {
  return &SecondaryQRCodeLoginServiceClient{
    c: c,
  }
}

func (p *SecondaryQRCodeLoginServiceClient) Client_() thrift.TClient {
  return p.c
}
// Parameters:
//  - Request
func (p *SecondaryQRCodeLoginServiceClient) CancelPinCode(ctx context.Context, request *CancelPinCodeRequest) (r *CancelPinCodeResponse, err error) {
  var _args2 SecondaryQRCodeLoginServiceCancelPinCodeArgs
  _args2.Request = request
  var _result3 SecondaryQRCodeLoginServiceCancelPinCodeResult
  if err = p.Client_().Call(ctx, "cancelPinCode", &_args2, &_result3); err != nil {
    return
  }
  switch {
  case _result3.E!= nil:
    return r, _result3.E
  }

  return _result3.GetSuccess(), nil
}

// Parameters:
//  - Request
func (p *SecondaryQRCodeLoginServiceClient) VerifyPinCode(ctx context.Context, request *VerifyPinCodeRequest) (r *VerifyPinCodeResponse, err error) {
  var _args4 SecondaryQRCodeLoginServiceVerifyPinCodeArgs
  _args4.Request = request
  var _result5 SecondaryQRCodeLoginServiceVerifyPinCodeResult
  if err = p.Client_().Call(ctx, "verifyPinCode", &_args4, &_result5); err != nil {
    return
  }
  switch {
  case _result5.E!= nil:
    return r, _result5.E
  }

  return _result5.GetSuccess(), nil
}

// Parameters:
//  - Request
func (p *SecondaryQRCodeLoginServiceClient) VerifyQrCode(ctx context.Context, request *VerifyCertificateRequest) (r *VerifyQrCodeResponse, err error) {
  var _args6 SecondaryQRCodeLoginServiceVerifyQrCodeArgs
  _args6.Request = request
  var _result7 SecondaryQRCodeLoginServiceVerifyQrCodeResult
  if err = p.Client_().Call(ctx, "verifyQrCode", &_args6, &_result7); err != nil {
    return
  }
  switch {
  case _result7.E!= nil:
    return r, _result7.E
  }

  return _result7.GetSuccess(), nil
}

// Parameters:
//  - Request
func (p *SecondaryQRCodeLoginServiceClient) CreatePinCode(ctx context.Context, request *CreatePinCodeRequest) (r *CreatePinCodeResponse, err error) {
  var _args8 SecondaryQRCodeLoginServiceCreatePinCodeArgs
  _args8.Request = request
  var _result9 SecondaryQRCodeLoginServiceCreatePinCodeResult
  if err = p.Client_().Call(ctx, "createPinCode", &_args8, &_result9); err != nil {
    return
  }
  switch {
  case _result9.E!= nil:
    return r, _result9.E
  }

  return _result9.GetSuccess(), nil
}

// Parameters:
//  - Request
func (p *SecondaryQRCodeLoginServiceClient) CreateQrCode(ctx context.Context, request *CreateQrCodeRequest) (r *CreateQrCodeResponse, err error) {
  var _args10 SecondaryQRCodeLoginServiceCreateQrCodeArgs
  _args10.Request = request
  var _result11 SecondaryQRCodeLoginServiceCreateQrCodeResult
  if err = p.Client_().Call(ctx, "createQrCode", &_args10, &_result11); err != nil {
    return
  }
  switch {
  case _result11.E!= nil:
    return r, _result11.E
  }

  return _result11.GetSuccess(), nil
}

// Parameters:
//  - Request
func (p *SecondaryQRCodeLoginServiceClient) CreateSession(ctx context.Context, request *CreateQrSessionRequest) (r *CreateQrSessionResponse, err error) {
  var _args12 SecondaryQRCodeLoginServiceCreateSessionArgs
  _args12.Request = request
  var _result13 SecondaryQRCodeLoginServiceCreateSessionResult
  if err = p.Client_().Call(ctx, "createSession", &_args12, &_result13); err != nil {
    return
  }
  switch {
  case _result13.E!= nil:
    return r, _result13.E
  }

  return _result13.GetSuccess(), nil
}

// Parameters:
//  - Request
func (p *SecondaryQRCodeLoginServiceClient) QrCodeLogin(ctx context.Context, request *QrCodeLoginRequest) (r *QrCodeLoginResponse, err error) {
  var _args14 SecondaryQRCodeLoginServiceQrCodeLoginArgs
  _args14.Request = request
  var _result15 SecondaryQRCodeLoginServiceQrCodeLoginResult
  if err = p.Client_().Call(ctx, "qrCodeLogin", &_args14, &_result15); err != nil {
    return
  }
  switch {
  case _result15.E!= nil:
    return r, _result15.E
  }

  return _result15.GetSuccess(), nil
}

// Parameters:
//  - Request
func (p *SecondaryQRCodeLoginServiceClient) VerifyCertificate(ctx context.Context, request *VerifyCertificateRequest) (r *VerifyCertificateResponse, err error) {
  var _args16 SecondaryQRCodeLoginServiceVerifyCertificateArgs
  _args16.Request = request
  var _result17 SecondaryQRCodeLoginServiceVerifyCertificateResult
  if err = p.Client_().Call(ctx, "verifyCertificate", &_args16, &_result17); err != nil {
    return
  }
  switch {
  case _result17.E!= nil:
    return r, _result17.E
  }

  return _result17.GetSuccess(), nil
}

// Parameters:
//  - Request
func (p *SecondaryQRCodeLoginServiceClient) CheckPinCodeVerified(ctx context.Context, request *CheckPinCodeVerifiedRequest) (r *CheckPinCodeVerifiedResponse, err error) {
  var _args18 SecondaryQRCodeLoginServiceCheckPinCodeVerifiedArgs
  _args18.Request = request
  var _result19 SecondaryQRCodeLoginServiceCheckPinCodeVerifiedResult
  if err = p.Client_().Call(ctx, "checkPinCodeVerified", &_args18, &_result19); err != nil {
    return
  }
  switch {
  case _result19.E!= nil:
    return r, _result19.E
  }

  return _result19.GetSuccess(), nil
}

// Parameters:
//  - Request
func (p *SecondaryQRCodeLoginServiceClient) CheckQrCodeVerified(ctx context.Context, request *CheckQrCodeVerifiedRequest) (r *CheckQrCodeVerifiedResponse, err error) {
  var _args20 SecondaryQRCodeLoginServiceCheckQrCodeVerifiedArgs
  _args20.Request = request
  var _result21 SecondaryQRCodeLoginServiceCheckQrCodeVerifiedResult
  if err = p.Client_().Call(ctx, "checkQrCodeVerified", &_args20, &_result21); err != nil {
    return
  }
  switch {
  case _result21.E!= nil:
    return r, _result21.E
  }

  return _result21.GetSuccess(), nil
}

type SecondaryQRCodeLoginServiceProcessor struct {
  processorMap map[string]thrift.TProcessorFunction
  handler SecondaryQRCodeLoginService
}

func (p *SecondaryQRCodeLoginServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction) {
  p.processorMap[key] = processor
}

func (p *SecondaryQRCodeLoginServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool) {
  processor, ok = p.processorMap[key]
  return processor, ok
}

func (p *SecondaryQRCodeLoginServiceProcessor) ProcessorMap() map[string]thrift.TProcessorFunction {
  return p.processorMap
}

func NewSecondaryQRCodeLoginServiceProcessor(handler SecondaryQRCodeLoginService) *SecondaryQRCodeLoginServiceProcessor {

  self22 := &SecondaryQRCodeLoginServiceProcessor{handler:handler, processorMap:make(map[string]thrift.TProcessorFunction)}
  self22.processorMap["cancelPinCode"] = &secondaryQRCodeLoginServiceProcessorCancelPinCode{handler:handler}
  self22.processorMap["verifyPinCode"] = &secondaryQRCodeLoginServiceProcessorVerifyPinCode{handler:handler}
  self22.processorMap["verifyQrCode"] = &secondaryQRCodeLoginServiceProcessorVerifyQrCode{handler:handler}
  self22.processorMap["createPinCode"] = &secondaryQRCodeLoginServiceProcessorCreatePinCode{handler:handler}
  self22.processorMap["createQrCode"] = &secondaryQRCodeLoginServiceProcessorCreateQrCode{handler:handler}
  self22.processorMap["createSession"] = &secondaryQRCodeLoginServiceProcessorCreateSession{handler:handler}
  self22.processorMap["qrCodeLogin"] = &secondaryQRCodeLoginServiceProcessorQrCodeLogin{handler:handler}
  self22.processorMap["verifyCertificate"] = &secondaryQRCodeLoginServiceProcessorVerifyCertificate{handler:handler}
  self22.processorMap["checkPinCodeVerified"] = &secondaryQRCodeLoginServiceProcessorCheckPinCodeVerified{handler:handler}
  self22.processorMap["checkQrCodeVerified"] = &secondaryQRCodeLoginServiceProcessorCheckQrCodeVerified{handler:handler}
return self22
}

func (p *SecondaryQRCodeLoginServiceProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
  name, _, seqId, err := iprot.ReadMessageBegin()
  if err != nil { return false, err }
  if processor, ok := p.GetProcessorFunction(name); ok {
    return processor.Process(ctx, seqId, iprot, oprot)
  }
  iprot.Skip(thrift.STRUCT)
  iprot.ReadMessageEnd()
  x23 := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function " + name)
  oprot.WriteMessageBegin(name, thrift.EXCEPTION, seqId)
  x23.Write(oprot)
  oprot.WriteMessageEnd()
  oprot.Flush()
  return false, x23

}

type secondaryQRCodeLoginServiceProcessorCancelPinCode struct {
  handler SecondaryQRCodeLoginService
}

func (p *secondaryQRCodeLoginServiceProcessorCancelPinCode) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
  args := SecondaryQRCodeLoginServiceCancelPinCodeArgs{}
  if err = args.Read(iprot); err != nil {
    iprot.ReadMessageEnd()
    x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
    oprot.WriteMessageBegin("cancelPinCode", thrift.EXCEPTION, seqId)
    x.Write(oprot)
    oprot.WriteMessageEnd()
    oprot.Flush()
    return false, err
  }

  iprot.ReadMessageEnd()
  result := SecondaryQRCodeLoginServiceCancelPinCodeResult{}
var retval *CancelPinCodeResponse
  var err2 error
  if retval, err2 = p.handler.CancelPinCode(ctx, args.Request); err2 != nil {
  switch v := err2.(type) {
    case *SecondaryQrCodeException:
  result.E = v
    default:
    x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing cancelPinCode: " + err2.Error())
    oprot.WriteMessageBegin("cancelPinCode", thrift.EXCEPTION, seqId)
    x.Write(oprot)
    oprot.WriteMessageEnd()
    oprot.Flush()
    return true, err2
  }
  } else {
    result.Success = retval
}
  if err2 = oprot.WriteMessageBegin("cancelPinCode", thrift.REPLY, seqId); err2 != nil {
    err = err2
  }
  if err2 = result.Write(oprot); err == nil && err2 != nil {
    err = err2
  }
  if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
    err = err2
  }
  if err2 = oprot.Flush(); err == nil && err2 != nil {
    err = err2
  }
  if err != nil {
    return
  }
  return true, err
}

type secondaryQRCodeLoginServiceProcessorVerifyPinCode struct {
  handler SecondaryQRCodeLoginService
}

func (p *secondaryQRCodeLoginServiceProcessorVerifyPinCode) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
  args := SecondaryQRCodeLoginServiceVerifyPinCodeArgs{}
  if err = args.Read(iprot); err != nil {
    iprot.ReadMessageEnd()
    x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
    oprot.WriteMessageBegin("verifyPinCode", thrift.EXCEPTION, seqId)
    x.Write(oprot)
    oprot.WriteMessageEnd()
    oprot.Flush()
    return false, err
  }

  iprot.ReadMessageEnd()
  result := SecondaryQRCodeLoginServiceVerifyPinCodeResult{}
var retval *VerifyPinCodeResponse
  var err2 error
  if retval, err2 = p.handler.VerifyPinCode(ctx, args.Request); err2 != nil {
  switch v := err2.(type) {
    case *SecondaryQrCodeException:
  result.E = v
    default:
    x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing verifyPinCode: " + err2.Error())
    oprot.WriteMessageBegin("verifyPinCode", thrift.EXCEPTION, seqId)
    x.Write(oprot)
    oprot.WriteMessageEnd()
    oprot.Flush()
    return true, err2
  }
  } else {
    result.Success = retval
}
  if err2 = oprot.WriteMessageBegin("verifyPinCode", thrift.REPLY, seqId); err2 != nil {
    err = err2
  }
  if err2 = result.Write(oprot); err == nil && err2 != nil {
    err = err2
  }
  if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
    err = err2
  }
  if err2 = oprot.Flush(); err == nil && err2 != nil {
    err = err2
  }
  if err != nil {
    return
  }
  return true, err
}

type secondaryQRCodeLoginServiceProcessorVerifyQrCode struct {
  handler SecondaryQRCodeLoginService
}

func (p *secondaryQRCodeLoginServiceProcessorVerifyQrCode) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
  args := SecondaryQRCodeLoginServiceVerifyQrCodeArgs{}
  if err = args.Read(iprot); err != nil {
    iprot.ReadMessageEnd()
    x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
    oprot.WriteMessageBegin("verifyQrCode", thrift.EXCEPTION, seqId)
    x.Write(oprot)
    oprot.WriteMessageEnd()
    oprot.Flush()
    return false, err
  }

  iprot.ReadMessageEnd()
  result := SecondaryQRCodeLoginServiceVerifyQrCodeResult{}
var retval *VerifyQrCodeResponse
  var err2 error
  if retval, err2 = p.handler.VerifyQrCode(ctx, args.Request); err2 != nil {
  switch v := err2.(type) {
    case *SecondaryQrCodeException:
  result.E = v
    default:
    x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing verifyQrCode: " + err2.Error())
    oprot.WriteMessageBegin("verifyQrCode", thrift.EXCEPTION, seqId)
    x.Write(oprot)
    oprot.WriteMessageEnd()
    oprot.Flush()
    return true, err2
  }
  } else {
    result.Success = retval
}
  if err2 = oprot.WriteMessageBegin("verifyQrCode", thrift.REPLY, seqId); err2 != nil {
    err = err2
  }
  if err2 = result.Write(oprot); err == nil && err2 != nil {
    err = err2
  }
  if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
    err = err2
  }
  if err2 = oprot.Flush(); err == nil && err2 != nil {
    err = err2
  }
  if err != nil {
    return
  }
  return true, err
}

type secondaryQRCodeLoginServiceProcessorCreatePinCode struct {
  handler SecondaryQRCodeLoginService
}

func (p *secondaryQRCodeLoginServiceProcessorCreatePinCode) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
  args := SecondaryQRCodeLoginServiceCreatePinCodeArgs{}
  if err = args.Read(iprot); err != nil {
    iprot.ReadMessageEnd()
    x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
    oprot.WriteMessageBegin("createPinCode", thrift.EXCEPTION, seqId)
    x.Write(oprot)
    oprot.WriteMessageEnd()
    oprot.Flush()
    return false, err
  }

  iprot.ReadMessageEnd()
  result := SecondaryQRCodeLoginServiceCreatePinCodeResult{}
var retval *CreatePinCodeResponse
  var err2 error
  if retval, err2 = p.handler.CreatePinCode(ctx, args.Request); err2 != nil {
  switch v := err2.(type) {
    case *SecondaryQrCodeException:
  result.E = v
    default:
    x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createPinCode: " + err2.Error())
    oprot.WriteMessageBegin("createPinCode", thrift.EXCEPTION, seqId)
    x.Write(oprot)
    oprot.WriteMessageEnd()
    oprot.Flush()
    return true, err2
  }
  } else {
    result.Success = retval
}
  if err2 = oprot.WriteMessageBegin("createPinCode", thrift.REPLY, seqId); err2 != nil {
    err = err2
  }
  if err2 = result.Write(oprot); err == nil && err2 != nil {
    err = err2
  }
  if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
    err = err2
  }
  if err2 = oprot.Flush(); err == nil && err2 != nil {
    err = err2
  }
  if err != nil {
    return
  }
  return true, err
}

type secondaryQRCodeLoginServiceProcessorCreateQrCode struct {
  handler SecondaryQRCodeLoginService
}

func (p *secondaryQRCodeLoginServiceProcessorCreateQrCode) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
  args := SecondaryQRCodeLoginServiceCreateQrCodeArgs{}
  if err = args.Read(iprot); err != nil {
    iprot.ReadMessageEnd()
    x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
    oprot.WriteMessageBegin("createQrCode", thrift.EXCEPTION, seqId)
    x.Write(oprot)
    oprot.WriteMessageEnd()
    oprot.Flush()
    return false, err
  }

  iprot.ReadMessageEnd()
  result := SecondaryQRCodeLoginServiceCreateQrCodeResult{}
var retval *CreateQrCodeResponse
  var err2 error
  if retval, err2 = p.handler.CreateQrCode(ctx, args.Request); err2 != nil {
  switch v := err2.(type) {
    case *SecondaryQrCodeException:
  result.E = v
    default:
    x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createQrCode: " + err2.Error())
    oprot.WriteMessageBegin("createQrCode", thrift.EXCEPTION, seqId)
    x.Write(oprot)
    oprot.WriteMessageEnd()
    oprot.Flush()
    return true, err2
  }
  } else {
    result.Success = retval
}
  if err2 = oprot.WriteMessageBegin("createQrCode", thrift.REPLY, seqId); err2 != nil {
    err = err2
  }
  if err2 = result.Write(oprot); err == nil && err2 != nil {
    err = err2
  }
  if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
    err = err2
  }
  if err2 = oprot.Flush(); err == nil && err2 != nil {
    err = err2
  }
  if err != nil {
    return
  }
  return true, err
}

type secondaryQRCodeLoginServiceProcessorCreateSession struct {
  handler SecondaryQRCodeLoginService
}

func (p *secondaryQRCodeLoginServiceProcessorCreateSession) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
  args := SecondaryQRCodeLoginServiceCreateSessionArgs{}
  if err = args.Read(iprot); err != nil {
    iprot.ReadMessageEnd()
    x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
    oprot.WriteMessageBegin("createSession", thrift.EXCEPTION, seqId)
    x.Write(oprot)
    oprot.WriteMessageEnd()
    oprot.Flush()
    return false, err
  }

  iprot.ReadMessageEnd()
  result := SecondaryQRCodeLoginServiceCreateSessionResult{}
var retval *CreateQrSessionResponse
  var err2 error
  if retval, err2 = p.handler.CreateSession(ctx, args.Request); err2 != nil {
  switch v := err2.(type) {
    case *SecondaryQrCodeException:
  result.E = v
    default:
    x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createSession: " + err2.Error())
    oprot.WriteMessageBegin("createSession", thrift.EXCEPTION, seqId)
    x.Write(oprot)
    oprot.WriteMessageEnd()
    oprot.Flush()
    return true, err2
  }
  } else {
    result.Success = retval
}
  if err2 = oprot.WriteMessageBegin("createSession", thrift.REPLY, seqId); err2 != nil {
    err = err2
  }
  if err2 = result.Write(oprot); err == nil && err2 != nil {
    err = err2
  }
  if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
    err = err2
  }
  if err2 = oprot.Flush(); err == nil && err2 != nil {
    err = err2
  }
  if err != nil {
    return
  }
  return true, err
}

type secondaryQRCodeLoginServiceProcessorQrCodeLogin struct {
  handler SecondaryQRCodeLoginService
}

func (p *secondaryQRCodeLoginServiceProcessorQrCodeLogin) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
  args := SecondaryQRCodeLoginServiceQrCodeLoginArgs{}
  if err = args.Read(iprot); err != nil {
    iprot.ReadMessageEnd()
    x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
    oprot.WriteMessageBegin("qrCodeLogin", thrift.EXCEPTION, seqId)
    x.Write(oprot)
    oprot.WriteMessageEnd()
    oprot.Flush()
    return false, err
  }

  iprot.ReadMessageEnd()
  result := SecondaryQRCodeLoginServiceQrCodeLoginResult{}
var retval *QrCodeLoginResponse
  var err2 error
  if retval, err2 = p.handler.QrCodeLogin(ctx, args.Request); err2 != nil {
  switch v := err2.(type) {
    case *SecondaryQrCodeException:
  result.E = v
    default:
    x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing qrCodeLogin: " + err2.Error())
    oprot.WriteMessageBegin("qrCodeLogin", thrift.EXCEPTION, seqId)
    x.Write(oprot)
    oprot.WriteMessageEnd()
    oprot.Flush()
    return true, err2
  }
  } else {
    result.Success = retval
}
  if err2 = oprot.WriteMessageBegin("qrCodeLogin", thrift.REPLY, seqId); err2 != nil {
    err = err2
  }
  if err2 = result.Write(oprot); err == nil && err2 != nil {
    err = err2
  }
  if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
    err = err2
  }
  if err2 = oprot.Flush(); err == nil && err2 != nil {
    err = err2
  }
  if err != nil {
    return
  }
  return true, err
}

type secondaryQRCodeLoginServiceProcessorVerifyCertificate struct {
  handler SecondaryQRCodeLoginService
}

func (p *secondaryQRCodeLoginServiceProcessorVerifyCertificate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
  args := SecondaryQRCodeLoginServiceVerifyCertificateArgs{}
  if err = args.Read(iprot); err != nil {
    iprot.ReadMessageEnd()
    x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
    oprot.WriteMessageBegin("verifyCertificate", thrift.EXCEPTION, seqId)
    x.Write(oprot)
    oprot.WriteMessageEnd()
    oprot.Flush()
    return false, err
  }

  iprot.ReadMessageEnd()
  result := SecondaryQRCodeLoginServiceVerifyCertificateResult{}
var retval *VerifyCertificateResponse
  var err2 error
  if retval, err2 = p.handler.VerifyCertificate(ctx, args.Request); err2 != nil {
  switch v := err2.(type) {
    case *SecondaryQrCodeException:
  result.E = v
    default:
    x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing verifyCertificate: " + err2.Error())
    oprot.WriteMessageBegin("verifyCertificate", thrift.EXCEPTION, seqId)
    x.Write(oprot)
    oprot.WriteMessageEnd()
    oprot.Flush()
    return true, err2
  }
  } else {
    result.Success = retval
}
  if err2 = oprot.WriteMessageBegin("verifyCertificate", thrift.REPLY, seqId); err2 != nil {
    err = err2
  }
  if err2 = result.Write(oprot); err == nil && err2 != nil {
    err = err2
  }
  if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
    err = err2
  }
  if err2 = oprot.Flush(); err == nil && err2 != nil {
    err = err2
  }
  if err != nil {
    return
  }
  return true, err
}

type secondaryQRCodeLoginServiceProcessorCheckPinCodeVerified struct {
  handler SecondaryQRCodeLoginService
}

func (p *secondaryQRCodeLoginServiceProcessorCheckPinCodeVerified) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
  args := SecondaryQRCodeLoginServiceCheckPinCodeVerifiedArgs{}
  if err = args.Read(iprot); err != nil {
    iprot.ReadMessageEnd()
    x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
    oprot.WriteMessageBegin("checkPinCodeVerified", thrift.EXCEPTION, seqId)
    x.Write(oprot)
    oprot.WriteMessageEnd()
    oprot.Flush()
    return false, err
  }

  iprot.ReadMessageEnd()
  result := SecondaryQRCodeLoginServiceCheckPinCodeVerifiedResult{}
var retval *CheckPinCodeVerifiedResponse
  var err2 error
  if retval, err2 = p.handler.CheckPinCodeVerified(ctx, args.Request); err2 != nil {
  switch v := err2.(type) {
    case *SecondaryQrCodeException:
  result.E = v
    default:
    x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing checkPinCodeVerified: " + err2.Error())
    oprot.WriteMessageBegin("checkPinCodeVerified", thrift.EXCEPTION, seqId)
    x.Write(oprot)
    oprot.WriteMessageEnd()
    oprot.Flush()
    return true, err2
  }
  } else {
    result.Success = retval
}
  if err2 = oprot.WriteMessageBegin("checkPinCodeVerified", thrift.REPLY, seqId); err2 != nil {
    err = err2
  }
  if err2 = result.Write(oprot); err == nil && err2 != nil {
    err = err2
  }
  if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
    err = err2
  }
  if err2 = oprot.Flush(); err == nil && err2 != nil {
    err = err2
  }
  if err != nil {
    return
  }
  return true, err
}

type secondaryQRCodeLoginServiceProcessorCheckQrCodeVerified struct {
  handler SecondaryQRCodeLoginService
}

func (p *secondaryQRCodeLoginServiceProcessorCheckQrCodeVerified) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
  args := SecondaryQRCodeLoginServiceCheckQrCodeVerifiedArgs{}
  if err = args.Read(iprot); err != nil {
    iprot.ReadMessageEnd()
    x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
    oprot.WriteMessageBegin("checkQrCodeVerified", thrift.EXCEPTION, seqId)
    x.Write(oprot)
    oprot.WriteMessageEnd()
    oprot.Flush()
    return false, err
  }

  iprot.ReadMessageEnd()
  result := SecondaryQRCodeLoginServiceCheckQrCodeVerifiedResult{}
var retval *CheckQrCodeVerifiedResponse
  var err2 error
  if retval, err2 = p.handler.CheckQrCodeVerified(ctx, args.Request); err2 != nil {
  switch v := err2.(type) {
    case *SecondaryQrCodeException:
  result.E = v
    default:
    x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing checkQrCodeVerified: " + err2.Error())
    oprot.WriteMessageBegin("checkQrCodeVerified", thrift.EXCEPTION, seqId)
    x.Write(oprot)
    oprot.WriteMessageEnd()
    oprot.Flush()
    return true, err2
  }
  } else {
    result.Success = retval
}
  if err2 = oprot.WriteMessageBegin("checkQrCodeVerified", thrift.REPLY, seqId); err2 != nil {
    err = err2
  }
  if err2 = result.Write(oprot); err == nil && err2 != nil {
    err = err2
  }
  if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
    err = err2
  }
  if err2 = oprot.Flush(); err == nil && err2 != nil {
    err = err2
  }
  if err != nil {
    return
  }
  return true, err
}


// HELPER FUNCTIONS AND STRUCTURES

// Attributes:
//  - Request
type SecondaryQRCodeLoginServiceCancelPinCodeArgs struct {
  Request *CancelPinCodeRequest `thrift:"request,1" db:"request" json:"request"`
}

func NewSecondaryQRCodeLoginServiceCancelPinCodeArgs() *SecondaryQRCodeLoginServiceCancelPinCodeArgs {
  return &SecondaryQRCodeLoginServiceCancelPinCodeArgs{}
}

var SecondaryQRCodeLoginServiceCancelPinCodeArgs_Request_DEFAULT *CancelPinCodeRequest
func (p *SecondaryQRCodeLoginServiceCancelPinCodeArgs) GetRequest() *CancelPinCodeRequest {
  if !p.IsSetRequest() {
    return SecondaryQRCodeLoginServiceCancelPinCodeArgs_Request_DEFAULT
  }
return p.Request
}
func (p *SecondaryQRCodeLoginServiceCancelPinCodeArgs) IsSetRequest() bool {
  return p.Request != nil
}

func (p *SecondaryQRCodeLoginServiceCancelPinCodeArgs) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 1:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCancelPinCodeArgs)  ReadField1(iprot thrift.TProtocol) error {
  p.Request = &CancelPinCodeRequest{}
  if err := p.Request.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Request), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCancelPinCodeArgs) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("cancelPinCode_args"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCancelPinCodeArgs) writeField1(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:request: ", p), err) }
  if err := p.Request.Write(oprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Request), err)
  }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 1:request: ", p), err) }
  return err
}

func (p *SecondaryQRCodeLoginServiceCancelPinCodeArgs) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("SecondaryQRCodeLoginServiceCancelPinCodeArgs(%+v)", *p)
}

// Attributes:
//  - Success
//  - E
type SecondaryQRCodeLoginServiceCancelPinCodeResult struct {
  Success *CancelPinCodeResponse `thrift:"success,0" db:"success" json:"success,omitempty"`
  E *SecondaryQrCodeException `thrift:"e,1" db:"e" json:"e,omitempty"`
}

func NewSecondaryQRCodeLoginServiceCancelPinCodeResult() *SecondaryQRCodeLoginServiceCancelPinCodeResult {
  return &SecondaryQRCodeLoginServiceCancelPinCodeResult{}
}

var SecondaryQRCodeLoginServiceCancelPinCodeResult_Success_DEFAULT *CancelPinCodeResponse
func (p *SecondaryQRCodeLoginServiceCancelPinCodeResult) GetSuccess() *CancelPinCodeResponse {
  if !p.IsSetSuccess() {
    return SecondaryQRCodeLoginServiceCancelPinCodeResult_Success_DEFAULT
  }
return p.Success
}
var SecondaryQRCodeLoginServiceCancelPinCodeResult_E_DEFAULT *SecondaryQrCodeException
func (p *SecondaryQRCodeLoginServiceCancelPinCodeResult) GetE() *SecondaryQrCodeException {
  if !p.IsSetE() {
    return SecondaryQRCodeLoginServiceCancelPinCodeResult_E_DEFAULT
  }
return p.E
}
func (p *SecondaryQRCodeLoginServiceCancelPinCodeResult) IsSetSuccess() bool {
  return p.Success != nil
}

func (p *SecondaryQRCodeLoginServiceCancelPinCodeResult) IsSetE() bool {
  return p.E != nil
}

func (p *SecondaryQRCodeLoginServiceCancelPinCodeResult) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 0:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField0(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    case 1:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCancelPinCodeResult)  ReadField0(iprot thrift.TProtocol) error {
  p.Success = &CancelPinCodeResponse{}
  if err := p.Success.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCancelPinCodeResult)  ReadField1(iprot thrift.TProtocol) error {
  p.E = &SecondaryQrCodeException{}
  if err := p.E.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.E), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCancelPinCodeResult) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("cancelPinCode_result"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField0(oprot); err != nil { return err }
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCancelPinCodeResult) writeField0(oprot thrift.TProtocol) (err error) {
  if p.IsSetSuccess() {
    if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) }
    if err := p.Success.Write(oprot); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
    }
    if err := oprot.WriteFieldEnd(); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) }
  }
  return err
}

func (p *SecondaryQRCodeLoginServiceCancelPinCodeResult) writeField1(oprot thrift.TProtocol) (err error) {
  if p.IsSetE() {
    if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:e: ", p), err) }
    if err := p.E.Write(oprot); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.E), err)
    }
    if err := oprot.WriteFieldEnd(); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field end error 1:e: ", p), err) }
  }
  return err
}

func (p *SecondaryQRCodeLoginServiceCancelPinCodeResult) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("SecondaryQRCodeLoginServiceCancelPinCodeResult(%+v)", *p)
}

// Attributes:
//  - Request
type SecondaryQRCodeLoginServiceVerifyPinCodeArgs struct {
  Request *VerifyPinCodeRequest `thrift:"request,1" db:"request" json:"request"`
}

func NewSecondaryQRCodeLoginServiceVerifyPinCodeArgs() *SecondaryQRCodeLoginServiceVerifyPinCodeArgs {
  return &SecondaryQRCodeLoginServiceVerifyPinCodeArgs{}
}

var SecondaryQRCodeLoginServiceVerifyPinCodeArgs_Request_DEFAULT *VerifyPinCodeRequest
func (p *SecondaryQRCodeLoginServiceVerifyPinCodeArgs) GetRequest() *VerifyPinCodeRequest {
  if !p.IsSetRequest() {
    return SecondaryQRCodeLoginServiceVerifyPinCodeArgs_Request_DEFAULT
  }
return p.Request
}
func (p *SecondaryQRCodeLoginServiceVerifyPinCodeArgs) IsSetRequest() bool {
  return p.Request != nil
}

func (p *SecondaryQRCodeLoginServiceVerifyPinCodeArgs) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 1:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceVerifyPinCodeArgs)  ReadField1(iprot thrift.TProtocol) error {
  p.Request = &VerifyPinCodeRequest{}
  if err := p.Request.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Request), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceVerifyPinCodeArgs) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("verifyPinCode_args"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *SecondaryQRCodeLoginServiceVerifyPinCodeArgs) writeField1(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:request: ", p), err) }
  if err := p.Request.Write(oprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Request), err)
  }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 1:request: ", p), err) }
  return err
}

func (p *SecondaryQRCodeLoginServiceVerifyPinCodeArgs) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("SecondaryQRCodeLoginServiceVerifyPinCodeArgs(%+v)", *p)
}

// Attributes:
//  - Success
//  - E
type SecondaryQRCodeLoginServiceVerifyPinCodeResult struct {
  Success *VerifyPinCodeResponse `thrift:"success,0" db:"success" json:"success,omitempty"`
  E *SecondaryQrCodeException `thrift:"e,1" db:"e" json:"e,omitempty"`
}

func NewSecondaryQRCodeLoginServiceVerifyPinCodeResult() *SecondaryQRCodeLoginServiceVerifyPinCodeResult {
  return &SecondaryQRCodeLoginServiceVerifyPinCodeResult{}
}

var SecondaryQRCodeLoginServiceVerifyPinCodeResult_Success_DEFAULT *VerifyPinCodeResponse
func (p *SecondaryQRCodeLoginServiceVerifyPinCodeResult) GetSuccess() *VerifyPinCodeResponse {
  if !p.IsSetSuccess() {
    return SecondaryQRCodeLoginServiceVerifyPinCodeResult_Success_DEFAULT
  }
return p.Success
}
var SecondaryQRCodeLoginServiceVerifyPinCodeResult_E_DEFAULT *SecondaryQrCodeException
func (p *SecondaryQRCodeLoginServiceVerifyPinCodeResult) GetE() *SecondaryQrCodeException {
  if !p.IsSetE() {
    return SecondaryQRCodeLoginServiceVerifyPinCodeResult_E_DEFAULT
  }
return p.E
}
func (p *SecondaryQRCodeLoginServiceVerifyPinCodeResult) IsSetSuccess() bool {
  return p.Success != nil
}

func (p *SecondaryQRCodeLoginServiceVerifyPinCodeResult) IsSetE() bool {
  return p.E != nil
}

func (p *SecondaryQRCodeLoginServiceVerifyPinCodeResult) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 0:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField0(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    case 1:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceVerifyPinCodeResult)  ReadField0(iprot thrift.TProtocol) error {
  p.Success = &VerifyPinCodeResponse{}
  if err := p.Success.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceVerifyPinCodeResult)  ReadField1(iprot thrift.TProtocol) error {
  p.E = &SecondaryQrCodeException{}
  if err := p.E.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.E), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceVerifyPinCodeResult) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("verifyPinCode_result"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField0(oprot); err != nil { return err }
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *SecondaryQRCodeLoginServiceVerifyPinCodeResult) writeField0(oprot thrift.TProtocol) (err error) {
  if p.IsSetSuccess() {
    if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) }
    if err := p.Success.Write(oprot); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
    }
    if err := oprot.WriteFieldEnd(); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) }
  }
  return err
}

func (p *SecondaryQRCodeLoginServiceVerifyPinCodeResult) writeField1(oprot thrift.TProtocol) (err error) {
  if p.IsSetE() {
    if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:e: ", p), err) }
    if err := p.E.Write(oprot); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.E), err)
    }
    if err := oprot.WriteFieldEnd(); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field end error 1:e: ", p), err) }
  }
  return err
}

func (p *SecondaryQRCodeLoginServiceVerifyPinCodeResult) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("SecondaryQRCodeLoginServiceVerifyPinCodeResult(%+v)", *p)
}

// Attributes:
//  - Request
type SecondaryQRCodeLoginServiceVerifyQrCodeArgs struct {
  Request *VerifyCertificateRequest `thrift:"request,1" db:"request" json:"request"`
}

func NewSecondaryQRCodeLoginServiceVerifyQrCodeArgs() *SecondaryQRCodeLoginServiceVerifyQrCodeArgs {
  return &SecondaryQRCodeLoginServiceVerifyQrCodeArgs{}
}

var SecondaryQRCodeLoginServiceVerifyQrCodeArgs_Request_DEFAULT *VerifyCertificateRequest
func (p *SecondaryQRCodeLoginServiceVerifyQrCodeArgs) GetRequest() *VerifyCertificateRequest {
  if !p.IsSetRequest() {
    return SecondaryQRCodeLoginServiceVerifyQrCodeArgs_Request_DEFAULT
  }
return p.Request
}
func (p *SecondaryQRCodeLoginServiceVerifyQrCodeArgs) IsSetRequest() bool {
  return p.Request != nil
}

func (p *SecondaryQRCodeLoginServiceVerifyQrCodeArgs) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 1:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceVerifyQrCodeArgs)  ReadField1(iprot thrift.TProtocol) error {
  p.Request = &VerifyCertificateRequest{}
  if err := p.Request.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Request), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceVerifyQrCodeArgs) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("verifyQrCode_args"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *SecondaryQRCodeLoginServiceVerifyQrCodeArgs) writeField1(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:request: ", p), err) }
  if err := p.Request.Write(oprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Request), err)
  }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 1:request: ", p), err) }
  return err
}

func (p *SecondaryQRCodeLoginServiceVerifyQrCodeArgs) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("SecondaryQRCodeLoginServiceVerifyQrCodeArgs(%+v)", *p)
}

// Attributes:
//  - Success
//  - E
type SecondaryQRCodeLoginServiceVerifyQrCodeResult struct {
  Success *VerifyQrCodeResponse `thrift:"success,0" db:"success" json:"success,omitempty"`
  E *SecondaryQrCodeException `thrift:"e,1" db:"e" json:"e,omitempty"`
}

func NewSecondaryQRCodeLoginServiceVerifyQrCodeResult() *SecondaryQRCodeLoginServiceVerifyQrCodeResult {
  return &SecondaryQRCodeLoginServiceVerifyQrCodeResult{}
}

var SecondaryQRCodeLoginServiceVerifyQrCodeResult_Success_DEFAULT *VerifyQrCodeResponse
func (p *SecondaryQRCodeLoginServiceVerifyQrCodeResult) GetSuccess() *VerifyQrCodeResponse {
  if !p.IsSetSuccess() {
    return SecondaryQRCodeLoginServiceVerifyQrCodeResult_Success_DEFAULT
  }
return p.Success
}
var SecondaryQRCodeLoginServiceVerifyQrCodeResult_E_DEFAULT *SecondaryQrCodeException
func (p *SecondaryQRCodeLoginServiceVerifyQrCodeResult) GetE() *SecondaryQrCodeException {
  if !p.IsSetE() {
    return SecondaryQRCodeLoginServiceVerifyQrCodeResult_E_DEFAULT
  }
return p.E
}
func (p *SecondaryQRCodeLoginServiceVerifyQrCodeResult) IsSetSuccess() bool {
  return p.Success != nil
}

func (p *SecondaryQRCodeLoginServiceVerifyQrCodeResult) IsSetE() bool {
  return p.E != nil
}

func (p *SecondaryQRCodeLoginServiceVerifyQrCodeResult) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 0:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField0(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    case 1:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceVerifyQrCodeResult)  ReadField0(iprot thrift.TProtocol) error {
  p.Success = &VerifyQrCodeResponse{}
  if err := p.Success.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceVerifyQrCodeResult)  ReadField1(iprot thrift.TProtocol) error {
  p.E = &SecondaryQrCodeException{}
  if err := p.E.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.E), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceVerifyQrCodeResult) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("verifyQrCode_result"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField0(oprot); err != nil { return err }
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *SecondaryQRCodeLoginServiceVerifyQrCodeResult) writeField0(oprot thrift.TProtocol) (err error) {
  if p.IsSetSuccess() {
    if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) }
    if err := p.Success.Write(oprot); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
    }
    if err := oprot.WriteFieldEnd(); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) }
  }
  return err
}

func (p *SecondaryQRCodeLoginServiceVerifyQrCodeResult) writeField1(oprot thrift.TProtocol) (err error) {
  if p.IsSetE() {
    if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:e: ", p), err) }
    if err := p.E.Write(oprot); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.E), err)
    }
    if err := oprot.WriteFieldEnd(); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field end error 1:e: ", p), err) }
  }
  return err
}

func (p *SecondaryQRCodeLoginServiceVerifyQrCodeResult) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("SecondaryQRCodeLoginServiceVerifyQrCodeResult(%+v)", *p)
}

// Attributes:
//  - Request
type SecondaryQRCodeLoginServiceCreatePinCodeArgs struct {
  Request *CreatePinCodeRequest `thrift:"request,1" db:"request" json:"request"`
}

func NewSecondaryQRCodeLoginServiceCreatePinCodeArgs() *SecondaryQRCodeLoginServiceCreatePinCodeArgs {
  return &SecondaryQRCodeLoginServiceCreatePinCodeArgs{}
}

var SecondaryQRCodeLoginServiceCreatePinCodeArgs_Request_DEFAULT *CreatePinCodeRequest
func (p *SecondaryQRCodeLoginServiceCreatePinCodeArgs) GetRequest() *CreatePinCodeRequest {
  if !p.IsSetRequest() {
    return SecondaryQRCodeLoginServiceCreatePinCodeArgs_Request_DEFAULT
  }
return p.Request
}
func (p *SecondaryQRCodeLoginServiceCreatePinCodeArgs) IsSetRequest() bool {
  return p.Request != nil
}

func (p *SecondaryQRCodeLoginServiceCreatePinCodeArgs) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 1:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCreatePinCodeArgs)  ReadField1(iprot thrift.TProtocol) error {
  p.Request = &CreatePinCodeRequest{}
  if err := p.Request.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Request), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCreatePinCodeArgs) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("createPinCode_args"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCreatePinCodeArgs) writeField1(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:request: ", p), err) }
  if err := p.Request.Write(oprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Request), err)
  }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 1:request: ", p), err) }
  return err
}

func (p *SecondaryQRCodeLoginServiceCreatePinCodeArgs) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("SecondaryQRCodeLoginServiceCreatePinCodeArgs(%+v)", *p)
}

// Attributes:
//  - Success
//  - E
type SecondaryQRCodeLoginServiceCreatePinCodeResult struct {
  Success *CreatePinCodeResponse `thrift:"success,0" db:"success" json:"success,omitempty"`
  E *SecondaryQrCodeException `thrift:"e,1" db:"e" json:"e,omitempty"`
}

func NewSecondaryQRCodeLoginServiceCreatePinCodeResult() *SecondaryQRCodeLoginServiceCreatePinCodeResult {
  return &SecondaryQRCodeLoginServiceCreatePinCodeResult{}
}

var SecondaryQRCodeLoginServiceCreatePinCodeResult_Success_DEFAULT *CreatePinCodeResponse
func (p *SecondaryQRCodeLoginServiceCreatePinCodeResult) GetSuccess() *CreatePinCodeResponse {
  if !p.IsSetSuccess() {
    return SecondaryQRCodeLoginServiceCreatePinCodeResult_Success_DEFAULT
  }
return p.Success
}
var SecondaryQRCodeLoginServiceCreatePinCodeResult_E_DEFAULT *SecondaryQrCodeException
func (p *SecondaryQRCodeLoginServiceCreatePinCodeResult) GetE() *SecondaryQrCodeException {
  if !p.IsSetE() {
    return SecondaryQRCodeLoginServiceCreatePinCodeResult_E_DEFAULT
  }
return p.E
}
func (p *SecondaryQRCodeLoginServiceCreatePinCodeResult) IsSetSuccess() bool {
  return p.Success != nil
}

func (p *SecondaryQRCodeLoginServiceCreatePinCodeResult) IsSetE() bool {
  return p.E != nil
}

func (p *SecondaryQRCodeLoginServiceCreatePinCodeResult) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 0:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField0(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    case 1:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCreatePinCodeResult)  ReadField0(iprot thrift.TProtocol) error {
  p.Success = &CreatePinCodeResponse{}
  if err := p.Success.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCreatePinCodeResult)  ReadField1(iprot thrift.TProtocol) error {
  p.E = &SecondaryQrCodeException{}
  if err := p.E.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.E), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCreatePinCodeResult) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("createPinCode_result"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField0(oprot); err != nil { return err }
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCreatePinCodeResult) writeField0(oprot thrift.TProtocol) (err error) {
  if p.IsSetSuccess() {
    if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) }
    if err := p.Success.Write(oprot); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
    }
    if err := oprot.WriteFieldEnd(); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) }
  }
  return err
}

func (p *SecondaryQRCodeLoginServiceCreatePinCodeResult) writeField1(oprot thrift.TProtocol) (err error) {
  if p.IsSetE() {
    if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:e: ", p), err) }
    if err := p.E.Write(oprot); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.E), err)
    }
    if err := oprot.WriteFieldEnd(); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field end error 1:e: ", p), err) }
  }
  return err
}

func (p *SecondaryQRCodeLoginServiceCreatePinCodeResult) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("SecondaryQRCodeLoginServiceCreatePinCodeResult(%+v)", *p)
}

// Attributes:
//  - Request
type SecondaryQRCodeLoginServiceCreateQrCodeArgs struct {
  Request *CreateQrCodeRequest `thrift:"request,1" db:"request" json:"request"`
}

func NewSecondaryQRCodeLoginServiceCreateQrCodeArgs() *SecondaryQRCodeLoginServiceCreateQrCodeArgs {
  return &SecondaryQRCodeLoginServiceCreateQrCodeArgs{}
}

var SecondaryQRCodeLoginServiceCreateQrCodeArgs_Request_DEFAULT *CreateQrCodeRequest
func (p *SecondaryQRCodeLoginServiceCreateQrCodeArgs) GetRequest() *CreateQrCodeRequest {
  if !p.IsSetRequest() {
    return SecondaryQRCodeLoginServiceCreateQrCodeArgs_Request_DEFAULT
  }
return p.Request
}
func (p *SecondaryQRCodeLoginServiceCreateQrCodeArgs) IsSetRequest() bool {
  return p.Request != nil
}

func (p *SecondaryQRCodeLoginServiceCreateQrCodeArgs) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 1:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCreateQrCodeArgs)  ReadField1(iprot thrift.TProtocol) error {
  p.Request = &CreateQrCodeRequest{}
  if err := p.Request.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Request), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCreateQrCodeArgs) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("createQrCode_args"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCreateQrCodeArgs) writeField1(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:request: ", p), err) }
  if err := p.Request.Write(oprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Request), err)
  }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 1:request: ", p), err) }
  return err
}

func (p *SecondaryQRCodeLoginServiceCreateQrCodeArgs) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("SecondaryQRCodeLoginServiceCreateQrCodeArgs(%+v)", *p)
}

// Attributes:
//  - Success
//  - E
type SecondaryQRCodeLoginServiceCreateQrCodeResult struct {
  Success *CreateQrCodeResponse `thrift:"success,0" db:"success" json:"success,omitempty"`
  E *SecondaryQrCodeException `thrift:"e,1" db:"e" json:"e,omitempty"`
}

func NewSecondaryQRCodeLoginServiceCreateQrCodeResult() *SecondaryQRCodeLoginServiceCreateQrCodeResult {
  return &SecondaryQRCodeLoginServiceCreateQrCodeResult{}
}

var SecondaryQRCodeLoginServiceCreateQrCodeResult_Success_DEFAULT *CreateQrCodeResponse
func (p *SecondaryQRCodeLoginServiceCreateQrCodeResult) GetSuccess() *CreateQrCodeResponse {
  if !p.IsSetSuccess() {
    return SecondaryQRCodeLoginServiceCreateQrCodeResult_Success_DEFAULT
  }
return p.Success
}
var SecondaryQRCodeLoginServiceCreateQrCodeResult_E_DEFAULT *SecondaryQrCodeException
func (p *SecondaryQRCodeLoginServiceCreateQrCodeResult) GetE() *SecondaryQrCodeException {
  if !p.IsSetE() {
    return SecondaryQRCodeLoginServiceCreateQrCodeResult_E_DEFAULT
  }
return p.E
}
func (p *SecondaryQRCodeLoginServiceCreateQrCodeResult) IsSetSuccess() bool {
  return p.Success != nil
}

func (p *SecondaryQRCodeLoginServiceCreateQrCodeResult) IsSetE() bool {
  return p.E != nil
}

func (p *SecondaryQRCodeLoginServiceCreateQrCodeResult) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 0:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField0(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    case 1:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCreateQrCodeResult)  ReadField0(iprot thrift.TProtocol) error {
  p.Success = &CreateQrCodeResponse{}
  if err := p.Success.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCreateQrCodeResult)  ReadField1(iprot thrift.TProtocol) error {
  p.E = &SecondaryQrCodeException{}
  if err := p.E.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.E), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCreateQrCodeResult) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("createQrCode_result"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField0(oprot); err != nil { return err }
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCreateQrCodeResult) writeField0(oprot thrift.TProtocol) (err error) {
  if p.IsSetSuccess() {
    if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) }
    if err := p.Success.Write(oprot); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
    }
    if err := oprot.WriteFieldEnd(); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) }
  }
  return err
}

func (p *SecondaryQRCodeLoginServiceCreateQrCodeResult) writeField1(oprot thrift.TProtocol) (err error) {
  if p.IsSetE() {
    if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:e: ", p), err) }
    if err := p.E.Write(oprot); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.E), err)
    }
    if err := oprot.WriteFieldEnd(); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field end error 1:e: ", p), err) }
  }
  return err
}

func (p *SecondaryQRCodeLoginServiceCreateQrCodeResult) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("SecondaryQRCodeLoginServiceCreateQrCodeResult(%+v)", *p)
}

// Attributes:
//  - Request
type SecondaryQRCodeLoginServiceCreateSessionArgs struct {
  Request *CreateQrSessionRequest `thrift:"request,1" db:"request" json:"request"`
}

func NewSecondaryQRCodeLoginServiceCreateSessionArgs() *SecondaryQRCodeLoginServiceCreateSessionArgs {
  return &SecondaryQRCodeLoginServiceCreateSessionArgs{}
}

var SecondaryQRCodeLoginServiceCreateSessionArgs_Request_DEFAULT *CreateQrSessionRequest
func (p *SecondaryQRCodeLoginServiceCreateSessionArgs) GetRequest() *CreateQrSessionRequest {
  if !p.IsSetRequest() {
    return SecondaryQRCodeLoginServiceCreateSessionArgs_Request_DEFAULT
  }
return p.Request
}
func (p *SecondaryQRCodeLoginServiceCreateSessionArgs) IsSetRequest() bool {
  return p.Request != nil
}

func (p *SecondaryQRCodeLoginServiceCreateSessionArgs) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 1:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCreateSessionArgs)  ReadField1(iprot thrift.TProtocol) error {
  p.Request = &CreateQrSessionRequest{}
  if err := p.Request.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Request), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCreateSessionArgs) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("createSession_args"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCreateSessionArgs) writeField1(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:request: ", p), err) }
  if err := p.Request.Write(oprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Request), err)
  }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 1:request: ", p), err) }
  return err
}

func (p *SecondaryQRCodeLoginServiceCreateSessionArgs) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("SecondaryQRCodeLoginServiceCreateSessionArgs(%+v)", *p)
}

// Attributes:
//  - Success
//  - E
type SecondaryQRCodeLoginServiceCreateSessionResult struct {
  Success *CreateQrSessionResponse `thrift:"success,0" db:"success" json:"success,omitempty"`
  E *SecondaryQrCodeException `thrift:"e,1" db:"e" json:"e,omitempty"`
}

func NewSecondaryQRCodeLoginServiceCreateSessionResult() *SecondaryQRCodeLoginServiceCreateSessionResult {
  return &SecondaryQRCodeLoginServiceCreateSessionResult{}
}

var SecondaryQRCodeLoginServiceCreateSessionResult_Success_DEFAULT *CreateQrSessionResponse
func (p *SecondaryQRCodeLoginServiceCreateSessionResult) GetSuccess() *CreateQrSessionResponse {
  if !p.IsSetSuccess() {
    return SecondaryQRCodeLoginServiceCreateSessionResult_Success_DEFAULT
  }
return p.Success
}
var SecondaryQRCodeLoginServiceCreateSessionResult_E_DEFAULT *SecondaryQrCodeException
func (p *SecondaryQRCodeLoginServiceCreateSessionResult) GetE() *SecondaryQrCodeException {
  if !p.IsSetE() {
    return SecondaryQRCodeLoginServiceCreateSessionResult_E_DEFAULT
  }
return p.E
}
func (p *SecondaryQRCodeLoginServiceCreateSessionResult) IsSetSuccess() bool {
  return p.Success != nil
}

func (p *SecondaryQRCodeLoginServiceCreateSessionResult) IsSetE() bool {
  return p.E != nil
}

func (p *SecondaryQRCodeLoginServiceCreateSessionResult) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 0:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField0(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    case 1:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCreateSessionResult)  ReadField0(iprot thrift.TProtocol) error {
  p.Success = &CreateQrSessionResponse{}
  if err := p.Success.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCreateSessionResult)  ReadField1(iprot thrift.TProtocol) error {
  p.E = &SecondaryQrCodeException{}
  if err := p.E.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.E), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCreateSessionResult) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("createSession_result"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField0(oprot); err != nil { return err }
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCreateSessionResult) writeField0(oprot thrift.TProtocol) (err error) {
  if p.IsSetSuccess() {
    if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) }
    if err := p.Success.Write(oprot); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
    }
    if err := oprot.WriteFieldEnd(); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) }
  }
  return err
}

func (p *SecondaryQRCodeLoginServiceCreateSessionResult) writeField1(oprot thrift.TProtocol) (err error) {
  if p.IsSetE() {
    if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:e: ", p), err) }
    if err := p.E.Write(oprot); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.E), err)
    }
    if err := oprot.WriteFieldEnd(); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field end error 1:e: ", p), err) }
  }
  return err
}

func (p *SecondaryQRCodeLoginServiceCreateSessionResult) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("SecondaryQRCodeLoginServiceCreateSessionResult(%+v)", *p)
}

// Attributes:
//  - Request
type SecondaryQRCodeLoginServiceQrCodeLoginArgs struct {
  Request *QrCodeLoginRequest `thrift:"request,1" db:"request" json:"request"`
}

func NewSecondaryQRCodeLoginServiceQrCodeLoginArgs() *SecondaryQRCodeLoginServiceQrCodeLoginArgs {
  return &SecondaryQRCodeLoginServiceQrCodeLoginArgs{}
}

var SecondaryQRCodeLoginServiceQrCodeLoginArgs_Request_DEFAULT *QrCodeLoginRequest
func (p *SecondaryQRCodeLoginServiceQrCodeLoginArgs) GetRequest() *QrCodeLoginRequest {
  if !p.IsSetRequest() {
    return SecondaryQRCodeLoginServiceQrCodeLoginArgs_Request_DEFAULT
  }
return p.Request
}
func (p *SecondaryQRCodeLoginServiceQrCodeLoginArgs) IsSetRequest() bool {
  return p.Request != nil
}

func (p *SecondaryQRCodeLoginServiceQrCodeLoginArgs) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 1:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceQrCodeLoginArgs)  ReadField1(iprot thrift.TProtocol) error {
  p.Request = &QrCodeLoginRequest{}
  if err := p.Request.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Request), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceQrCodeLoginArgs) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("qrCodeLogin_args"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *SecondaryQRCodeLoginServiceQrCodeLoginArgs) writeField1(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:request: ", p), err) }
  if err := p.Request.Write(oprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Request), err)
  }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 1:request: ", p), err) }
  return err
}

func (p *SecondaryQRCodeLoginServiceQrCodeLoginArgs) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("SecondaryQRCodeLoginServiceQrCodeLoginArgs(%+v)", *p)
}

// Attributes:
//  - Success
//  - E
type SecondaryQRCodeLoginServiceQrCodeLoginResult struct {
  Success *QrCodeLoginResponse `thrift:"success,0" db:"success" json:"success,omitempty"`
  E *SecondaryQrCodeException `thrift:"e,1" db:"e" json:"e,omitempty"`
}

func NewSecondaryQRCodeLoginServiceQrCodeLoginResult() *SecondaryQRCodeLoginServiceQrCodeLoginResult {
  return &SecondaryQRCodeLoginServiceQrCodeLoginResult{}
}

var SecondaryQRCodeLoginServiceQrCodeLoginResult_Success_DEFAULT *QrCodeLoginResponse
func (p *SecondaryQRCodeLoginServiceQrCodeLoginResult) GetSuccess() *QrCodeLoginResponse {
  if !p.IsSetSuccess() {
    return SecondaryQRCodeLoginServiceQrCodeLoginResult_Success_DEFAULT
  }
return p.Success
}
var SecondaryQRCodeLoginServiceQrCodeLoginResult_E_DEFAULT *SecondaryQrCodeException
func (p *SecondaryQRCodeLoginServiceQrCodeLoginResult) GetE() *SecondaryQrCodeException {
  if !p.IsSetE() {
    return SecondaryQRCodeLoginServiceQrCodeLoginResult_E_DEFAULT
  }
return p.E
}
func (p *SecondaryQRCodeLoginServiceQrCodeLoginResult) IsSetSuccess() bool {
  return p.Success != nil
}

func (p *SecondaryQRCodeLoginServiceQrCodeLoginResult) IsSetE() bool {
  return p.E != nil
}

func (p *SecondaryQRCodeLoginServiceQrCodeLoginResult) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 0:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField0(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    case 1:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceQrCodeLoginResult)  ReadField0(iprot thrift.TProtocol) error {
  p.Success = &QrCodeLoginResponse{}
  if err := p.Success.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceQrCodeLoginResult)  ReadField1(iprot thrift.TProtocol) error {
  p.E = &SecondaryQrCodeException{}
  if err := p.E.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.E), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceQrCodeLoginResult) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("qrCodeLogin_result"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField0(oprot); err != nil { return err }
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *SecondaryQRCodeLoginServiceQrCodeLoginResult) writeField0(oprot thrift.TProtocol) (err error) {
  if p.IsSetSuccess() {
    if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) }
    if err := p.Success.Write(oprot); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
    }
    if err := oprot.WriteFieldEnd(); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) }
  }
  return err
}

func (p *SecondaryQRCodeLoginServiceQrCodeLoginResult) writeField1(oprot thrift.TProtocol) (err error) {
  if p.IsSetE() {
    if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:e: ", p), err) }
    if err := p.E.Write(oprot); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.E), err)
    }
    if err := oprot.WriteFieldEnd(); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field end error 1:e: ", p), err) }
  }
  return err
}

func (p *SecondaryQRCodeLoginServiceQrCodeLoginResult) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("SecondaryQRCodeLoginServiceQrCodeLoginResult(%+v)", *p)
}

// Attributes:
//  - Request
type SecondaryQRCodeLoginServiceVerifyCertificateArgs struct {
  Request *VerifyCertificateRequest `thrift:"request,1" db:"request" json:"request"`
}

func NewSecondaryQRCodeLoginServiceVerifyCertificateArgs() *SecondaryQRCodeLoginServiceVerifyCertificateArgs {
  return &SecondaryQRCodeLoginServiceVerifyCertificateArgs{}
}

var SecondaryQRCodeLoginServiceVerifyCertificateArgs_Request_DEFAULT *VerifyCertificateRequest
func (p *SecondaryQRCodeLoginServiceVerifyCertificateArgs) GetRequest() *VerifyCertificateRequest {
  if !p.IsSetRequest() {
    return SecondaryQRCodeLoginServiceVerifyCertificateArgs_Request_DEFAULT
  }
return p.Request
}
func (p *SecondaryQRCodeLoginServiceVerifyCertificateArgs) IsSetRequest() bool {
  return p.Request != nil
}

func (p *SecondaryQRCodeLoginServiceVerifyCertificateArgs) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 1:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceVerifyCertificateArgs)  ReadField1(iprot thrift.TProtocol) error {
  p.Request = &VerifyCertificateRequest{}
  if err := p.Request.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Request), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceVerifyCertificateArgs) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("verifyCertificate_args"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *SecondaryQRCodeLoginServiceVerifyCertificateArgs) writeField1(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:request: ", p), err) }
  if err := p.Request.Write(oprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Request), err)
  }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 1:request: ", p), err) }
  return err
}

func (p *SecondaryQRCodeLoginServiceVerifyCertificateArgs) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("SecondaryQRCodeLoginServiceVerifyCertificateArgs(%+v)", *p)
}

// Attributes:
//  - Success
//  - E
type SecondaryQRCodeLoginServiceVerifyCertificateResult struct {
  Success *VerifyCertificateResponse `thrift:"success,0" db:"success" json:"success,omitempty"`
  E *SecondaryQrCodeException `thrift:"e,1" db:"e" json:"e,omitempty"`
}

func NewSecondaryQRCodeLoginServiceVerifyCertificateResult() *SecondaryQRCodeLoginServiceVerifyCertificateResult {
  return &SecondaryQRCodeLoginServiceVerifyCertificateResult{}
}

var SecondaryQRCodeLoginServiceVerifyCertificateResult_Success_DEFAULT *VerifyCertificateResponse
func (p *SecondaryQRCodeLoginServiceVerifyCertificateResult) GetSuccess() *VerifyCertificateResponse {
  if !p.IsSetSuccess() {
    return SecondaryQRCodeLoginServiceVerifyCertificateResult_Success_DEFAULT
  }
return p.Success
}
var SecondaryQRCodeLoginServiceVerifyCertificateResult_E_DEFAULT *SecondaryQrCodeException
func (p *SecondaryQRCodeLoginServiceVerifyCertificateResult) GetE() *SecondaryQrCodeException {
  if !p.IsSetE() {
    return SecondaryQRCodeLoginServiceVerifyCertificateResult_E_DEFAULT
  }
return p.E
}
func (p *SecondaryQRCodeLoginServiceVerifyCertificateResult) IsSetSuccess() bool {
  return p.Success != nil
}

func (p *SecondaryQRCodeLoginServiceVerifyCertificateResult) IsSetE() bool {
  return p.E != nil
}

func (p *SecondaryQRCodeLoginServiceVerifyCertificateResult) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 0:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField0(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    case 1:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceVerifyCertificateResult)  ReadField0(iprot thrift.TProtocol) error {
  p.Success = &VerifyCertificateResponse{}
  if err := p.Success.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceVerifyCertificateResult)  ReadField1(iprot thrift.TProtocol) error {
  p.E = &SecondaryQrCodeException{}
  if err := p.E.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.E), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceVerifyCertificateResult) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("verifyCertificate_result"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField0(oprot); err != nil { return err }
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *SecondaryQRCodeLoginServiceVerifyCertificateResult) writeField0(oprot thrift.TProtocol) (err error) {
  if p.IsSetSuccess() {
    if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) }
    if err := p.Success.Write(oprot); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
    }
    if err := oprot.WriteFieldEnd(); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) }
  }
  return err
}

func (p *SecondaryQRCodeLoginServiceVerifyCertificateResult) writeField1(oprot thrift.TProtocol) (err error) {
  if p.IsSetE() {
    if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:e: ", p), err) }
    if err := p.E.Write(oprot); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.E), err)
    }
    if err := oprot.WriteFieldEnd(); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field end error 1:e: ", p), err) }
  }
  return err
}

func (p *SecondaryQRCodeLoginServiceVerifyCertificateResult) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("SecondaryQRCodeLoginServiceVerifyCertificateResult(%+v)", *p)
}

// Attributes:
//  - Request
type SecondaryQRCodeLoginServiceCheckPinCodeVerifiedArgs struct {
  Request *CheckPinCodeVerifiedRequest `thrift:"request,1" db:"request" json:"request"`
}

func NewSecondaryQRCodeLoginServiceCheckPinCodeVerifiedArgs() *SecondaryQRCodeLoginServiceCheckPinCodeVerifiedArgs {
  return &SecondaryQRCodeLoginServiceCheckPinCodeVerifiedArgs{}
}

var SecondaryQRCodeLoginServiceCheckPinCodeVerifiedArgs_Request_DEFAULT *CheckPinCodeVerifiedRequest
func (p *SecondaryQRCodeLoginServiceCheckPinCodeVerifiedArgs) GetRequest() *CheckPinCodeVerifiedRequest {
  if !p.IsSetRequest() {
    return SecondaryQRCodeLoginServiceCheckPinCodeVerifiedArgs_Request_DEFAULT
  }
return p.Request
}
func (p *SecondaryQRCodeLoginServiceCheckPinCodeVerifiedArgs) IsSetRequest() bool {
  return p.Request != nil
}

func (p *SecondaryQRCodeLoginServiceCheckPinCodeVerifiedArgs) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 1:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCheckPinCodeVerifiedArgs)  ReadField1(iprot thrift.TProtocol) error {
  p.Request = &CheckPinCodeVerifiedRequest{}
  if err := p.Request.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Request), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCheckPinCodeVerifiedArgs) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("checkPinCodeVerified_args"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCheckPinCodeVerifiedArgs) writeField1(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:request: ", p), err) }
  if err := p.Request.Write(oprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Request), err)
  }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 1:request: ", p), err) }
  return err
}

func (p *SecondaryQRCodeLoginServiceCheckPinCodeVerifiedArgs) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("SecondaryQRCodeLoginServiceCheckPinCodeVerifiedArgs(%+v)", *p)
}

// Attributes:
//  - Success
//  - E
type SecondaryQRCodeLoginServiceCheckPinCodeVerifiedResult struct {
  Success *CheckPinCodeVerifiedResponse `thrift:"success,0" db:"success" json:"success,omitempty"`
  E *SecondaryQrCodeException `thrift:"e,1" db:"e" json:"e,omitempty"`
}

func NewSecondaryQRCodeLoginServiceCheckPinCodeVerifiedResult() *SecondaryQRCodeLoginServiceCheckPinCodeVerifiedResult {
  return &SecondaryQRCodeLoginServiceCheckPinCodeVerifiedResult{}
}

var SecondaryQRCodeLoginServiceCheckPinCodeVerifiedResult_Success_DEFAULT *CheckPinCodeVerifiedResponse
func (p *SecondaryQRCodeLoginServiceCheckPinCodeVerifiedResult) GetSuccess() *CheckPinCodeVerifiedResponse {
  if !p.IsSetSuccess() {
    return SecondaryQRCodeLoginServiceCheckPinCodeVerifiedResult_Success_DEFAULT
  }
return p.Success
}
var SecondaryQRCodeLoginServiceCheckPinCodeVerifiedResult_E_DEFAULT *SecondaryQrCodeException
func (p *SecondaryQRCodeLoginServiceCheckPinCodeVerifiedResult) GetE() *SecondaryQrCodeException {
  if !p.IsSetE() {
    return SecondaryQRCodeLoginServiceCheckPinCodeVerifiedResult_E_DEFAULT
  }
return p.E
}
func (p *SecondaryQRCodeLoginServiceCheckPinCodeVerifiedResult) IsSetSuccess() bool {
  return p.Success != nil
}

func (p *SecondaryQRCodeLoginServiceCheckPinCodeVerifiedResult) IsSetE() bool {
  return p.E != nil
}

func (p *SecondaryQRCodeLoginServiceCheckPinCodeVerifiedResult) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 0:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField0(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    case 1:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCheckPinCodeVerifiedResult)  ReadField0(iprot thrift.TProtocol) error {
  p.Success = &CheckPinCodeVerifiedResponse{}
  if err := p.Success.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCheckPinCodeVerifiedResult)  ReadField1(iprot thrift.TProtocol) error {
  p.E = &SecondaryQrCodeException{}
  if err := p.E.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.E), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCheckPinCodeVerifiedResult) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("checkPinCodeVerified_result"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField0(oprot); err != nil { return err }
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCheckPinCodeVerifiedResult) writeField0(oprot thrift.TProtocol) (err error) {
  if p.IsSetSuccess() {
    if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) }
    if err := p.Success.Write(oprot); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
    }
    if err := oprot.WriteFieldEnd(); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) }
  }
  return err
}

func (p *SecondaryQRCodeLoginServiceCheckPinCodeVerifiedResult) writeField1(oprot thrift.TProtocol) (err error) {
  if p.IsSetE() {
    if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:e: ", p), err) }
    if err := p.E.Write(oprot); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.E), err)
    }
    if err := oprot.WriteFieldEnd(); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field end error 1:e: ", p), err) }
  }
  return err
}

func (p *SecondaryQRCodeLoginServiceCheckPinCodeVerifiedResult) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("SecondaryQRCodeLoginServiceCheckPinCodeVerifiedResult(%+v)", *p)
}

// Attributes:
//  - Request
type SecondaryQRCodeLoginServiceCheckQrCodeVerifiedArgs struct {
  Request *CheckQrCodeVerifiedRequest `thrift:"request,1" db:"request" json:"request"`
}

func NewSecondaryQRCodeLoginServiceCheckQrCodeVerifiedArgs() *SecondaryQRCodeLoginServiceCheckQrCodeVerifiedArgs {
  return &SecondaryQRCodeLoginServiceCheckQrCodeVerifiedArgs{}
}

var SecondaryQRCodeLoginServiceCheckQrCodeVerifiedArgs_Request_DEFAULT *CheckQrCodeVerifiedRequest
func (p *SecondaryQRCodeLoginServiceCheckQrCodeVerifiedArgs) GetRequest() *CheckQrCodeVerifiedRequest {
  if !p.IsSetRequest() {
    return SecondaryQRCodeLoginServiceCheckQrCodeVerifiedArgs_Request_DEFAULT
  }
return p.Request
}
func (p *SecondaryQRCodeLoginServiceCheckQrCodeVerifiedArgs) IsSetRequest() bool {
  return p.Request != nil
}

func (p *SecondaryQRCodeLoginServiceCheckQrCodeVerifiedArgs) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 1:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCheckQrCodeVerifiedArgs)  ReadField1(iprot thrift.TProtocol) error {
  p.Request = &CheckQrCodeVerifiedRequest{}
  if err := p.Request.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Request), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCheckQrCodeVerifiedArgs) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("checkQrCodeVerified_args"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCheckQrCodeVerifiedArgs) writeField1(oprot thrift.TProtocol) (err error) {
  if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:request: ", p), err) }
  if err := p.Request.Write(oprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Request), err)
  }
  if err := oprot.WriteFieldEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write field end error 1:request: ", p), err) }
  return err
}

func (p *SecondaryQRCodeLoginServiceCheckQrCodeVerifiedArgs) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("SecondaryQRCodeLoginServiceCheckQrCodeVerifiedArgs(%+v)", *p)
}

// Attributes:
//  - Success
//  - E
type SecondaryQRCodeLoginServiceCheckQrCodeVerifiedResult struct {
  Success *CheckQrCodeVerifiedResponse `thrift:"success,0" db:"success" json:"success,omitempty"`
  E *SecondaryQrCodeException `thrift:"e,1" db:"e" json:"e,omitempty"`
}

func NewSecondaryQRCodeLoginServiceCheckQrCodeVerifiedResult() *SecondaryQRCodeLoginServiceCheckQrCodeVerifiedResult {
  return &SecondaryQRCodeLoginServiceCheckQrCodeVerifiedResult{}
}

var SecondaryQRCodeLoginServiceCheckQrCodeVerifiedResult_Success_DEFAULT *CheckQrCodeVerifiedResponse
func (p *SecondaryQRCodeLoginServiceCheckQrCodeVerifiedResult) GetSuccess() *CheckQrCodeVerifiedResponse {
  if !p.IsSetSuccess() {
    return SecondaryQRCodeLoginServiceCheckQrCodeVerifiedResult_Success_DEFAULT
  }
return p.Success
}
var SecondaryQRCodeLoginServiceCheckQrCodeVerifiedResult_E_DEFAULT *SecondaryQrCodeException
func (p *SecondaryQRCodeLoginServiceCheckQrCodeVerifiedResult) GetE() *SecondaryQrCodeException {
  if !p.IsSetE() {
    return SecondaryQRCodeLoginServiceCheckQrCodeVerifiedResult_E_DEFAULT
  }
return p.E
}
func (p *SecondaryQRCodeLoginServiceCheckQrCodeVerifiedResult) IsSetSuccess() bool {
  return p.Success != nil
}

func (p *SecondaryQRCodeLoginServiceCheckQrCodeVerifiedResult) IsSetE() bool {
  return p.E != nil
}

func (p *SecondaryQRCodeLoginServiceCheckQrCodeVerifiedResult) Read(iprot thrift.TProtocol) error {
  if _, err := iprot.ReadStructBegin(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
  }


  for {
    _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
    if err != nil {
      return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
    }
    if fieldTypeId == thrift.STOP { break; }
    switch fieldId {
    case 0:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField0(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    case 1:
      if fieldTypeId == thrift.STRUCT {
        if err := p.ReadField1(iprot); err != nil {
          return err
        }
      } else {
        if err := iprot.Skip(fieldTypeId); err != nil {
          return err
        }
      }
    default:
      if err := iprot.Skip(fieldTypeId); err != nil {
        return err
      }
    }
    if err := iprot.ReadFieldEnd(); err != nil {
      return err
    }
  }
  if err := iprot.ReadStructEnd(); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCheckQrCodeVerifiedResult)  ReadField0(iprot thrift.TProtocol) error {
  p.Success = &CheckQrCodeVerifiedResponse{}
  if err := p.Success.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCheckQrCodeVerifiedResult)  ReadField1(iprot thrift.TProtocol) error {
  p.E = &SecondaryQrCodeException{}
  if err := p.E.Read(iprot); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.E), err)
  }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCheckQrCodeVerifiedResult) Write(oprot thrift.TProtocol) error {
  if err := oprot.WriteStructBegin("checkQrCodeVerified_result"); err != nil {
    return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
  if p != nil {
    if err := p.writeField0(oprot); err != nil { return err }
    if err := p.writeField1(oprot); err != nil { return err }
  }
  if err := oprot.WriteFieldStop(); err != nil {
    return thrift.PrependError("write field stop error: ", err) }
  if err := oprot.WriteStructEnd(); err != nil {
    return thrift.PrependError("write struct stop error: ", err) }
  return nil
}

func (p *SecondaryQRCodeLoginServiceCheckQrCodeVerifiedResult) writeField0(oprot thrift.TProtocol) (err error) {
  if p.IsSetSuccess() {
    if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) }
    if err := p.Success.Write(oprot); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
    }
    if err := oprot.WriteFieldEnd(); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) }
  }
  return err
}

func (p *SecondaryQRCodeLoginServiceCheckQrCodeVerifiedResult) writeField1(oprot thrift.TProtocol) (err error) {
  if p.IsSetE() {
    if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:e: ", p), err) }
    if err := p.E.Write(oprot); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.E), err)
    }
    if err := oprot.WriteFieldEnd(); err != nil {
      return thrift.PrependError(fmt.Sprintf("%T write field end error 1:e: ", p), err) }
  }
  return err
}

func (p *SecondaryQRCodeLoginServiceCheckQrCodeVerifiedResult) String() string {
  if p == nil {
    return "<nil>"
  }
  return fmt.Sprintf("SecondaryQRCodeLoginServiceCheckQrCodeVerifiedResult(%+v)", *p)
}


